Index: branches/RC/core/units/user_groups/user_groups_dbitem.php =================================================================== diff -u -r8929 -r9230 --- branches/RC/core/units/user_groups/user_groups_dbitem.php (.../user_groups_dbitem.php) (revision 8929) +++ branches/RC/core/units/user_groups/user_groups_dbitem.php (.../user_groups_dbitem.php) (revision 9230) @@ -1,6 +1,6 @@ getLinkedInfo($this->Special); + $table_info = $this->getLinkedInfo($this->Special, true); if ($table_info) { // we have parent info, then use it $keys_hash = Array( @@ -24,7 +24,7 @@ } return parent::GetKeyClause($method, $keys_hash); } - + } Index: branches/RC/core/kernel/kbase.php =================================================================== diff -u -r9027 -r9230 --- branches/RC/core/kernel/kbase.php (.../kbase.php) (revision 9027) +++ branches/RC/core/kernel/kbase.php (.../kbase.php) (revision 9230) @@ -625,9 +625,10 @@ * * @param bool $from_temp load parent item from temp table * @param string $special special of main item + * @param bool $guess_special if object retrieved with specified special is not loaded, then try not to use special * @return Array */ - function getLinkedInfo($special = '') + function getLinkedInfo($special = '', $guess_special = false) { $parent_prefix = $this->Application->getUnitOption($this->Prefix, 'ParentPrefix'); if($parent_prefix) @@ -647,7 +648,12 @@ $table_info['ParentTableKey'] = getArrayValue($table_info, 'ParentTableKey', $parent_prefix); } - $main_object =& $this->Application->recallObject($parent_prefix.'.'.$special); + $main_object =& $this->Application->recallObject($parent_prefix.'.'.$special, null, Array ('raise_warnings' => 0)); + /* @var $main_object kDBItem */ + + if (!$main_object->isLoaded() && $guess_special) { + $main_object =& $this->Application->recallObject($parent_prefix); + } return array_merge($table_info, Array('ParentId'=> $main_object->GetDBField( $table_info['ParentTableKey'] ) ) ); } return false;