Index: branches/5.2.x/core/units/user_groups/user_groups_dbitem.php =================================================================== diff -u -N -r14244 -r14628 --- branches/5.2.x/core/units/user_groups/user_groups_dbitem.php (.../user_groups_dbitem.php) (revision 14244) +++ branches/5.2.x/core/units/user_groups/user_groups_dbitem.php (.../user_groups_dbitem.php) (revision 14628) @@ -1,6 +1,6 @@ getLinkedInfo($this->Special, true); - if ($table_info) { - // we have parent info, then use it - $keys_hash = Array( - $this->IDField => $this->ID, - $table_info['ForeignKey'] => $table_info['ParentId'], - ); - } - return parent::GetKeyClause($method, $keys_hash); + /** + * Returns part of SQL WHERE clause identifying the record, ex. id = 25 + * + * @param string $method Child class may want to know who called GetKeyClause, Load(), Update(), Delete() send its names as method + * @param Array $keys_hash alternative, then item id, keys hash to load item by + * @see kDBItem::Load() + * @see kDBItem::Update() + * @see kDBItem::Delete() + * + * @return string + * @access protected + */ + protected function GetKeyClause($method = null, $keys_hash = null) + { + $table_info = $this->getLinkedInfo($this->Special, true); + + if ( $table_info ) { + // we have parent info, then use it + $keys_hash = Array ($this->IDField => $this->GetID(), $table_info['ForeignKey'] => $table_info['ParentId']); } - } \ No newline at end of file + return parent::GetKeyClause($method, $keys_hash); + } +} \ No newline at end of file