/**
* Shift the eff/exp dates of this table so that it fits within its parent(s) (parent_eff <= child_eff < child_exp <= parent_exp)
* @param $record Doctrine_Record
* @return null
*/
protected function limitParentDates(Doctrine_Record $child)
{
// loop through temporal relationships and make sure this date range is inside the parent's range
foreach ($this->_options['parents'] as &$parent) {
try {
$parent_obj = $child->{$parent};
// TODO causes $parent->_oldValues to be erased
$child->setDatesWithinParent($parent_obj);
} catch (Doctrine_Record_SavingNonsenseException $e) {
$child->delete();
}
}
}