Index: branches/5.1.x/core/kernel/utility/temp_handler.php =================================================================== diff -u -N -r13162 -r13168 --- branches/5.1.x/core/kernel/utility/temp_handler.php (.../temp_handler.php) (revision 13162) +++ branches/5.1.x/core/kernel/utility/temp_handler.php (.../temp_handler.php) (revision 13168) @@ -1,6 +1,6 @@ Application->getUnitOption($rec['Prefix'], 'ParentTableKey'); + $parent_table_key = is_array($parent_table_key) ? $parent_table_key[$prefix] : $parent_table_key; + + if ($parent_table_key == $master['IdField']) { + $foreign_key = $this->Application->getUnitOption($rec['Prefix'], 'ForeignKey'); + $foreign_key = is_array($foreign_key) ? $foreign_key[$prefix] : $foreign_key; + + $changes[$key]['DependentFields'][$foreign_key] = $live_id; + } + } } }