public function updateAssociatedRecords()
{
$obj = $this->getContext()->getSourceRecord();
$fkObjects =& $obj->{$this->getContext()->getProperty()};
$success = true;
if (($total = count($fkObjects)) > 0) {
$source = $this->getSourceRecord();
$builder = $this->getAssociationTableCommandBuilder();
for ($i = 0; $i < $total; $i++) {
$success = $fkObjects[$i]->save() && $success;
}
return $this->updateAssociationTable($obj, $fkObjects, $builder) && $success;
}
return $success;
}