propelorm/Propel2

src/Propel/Generator/Behavior/AggregateColumn/templates/objectUpdateRelated.php
A

No issues here. Congrats!


/**
 * Update the aggregate column in the related <?=$relationName?> object
 *
 * @param ConnectionInterface $con A connection object
 */
protected function updateRelated<?=$relationName.$aggregateName?>(ConnectionInterface $con)
{
    if ($<?=$variableName?> = $this->get<?=$relationName?>()) {
        $<?=$variableName?>-><?=$updateMethodName?>($con);
    }
    if ($this->old<?=$relationName.$aggregateName?>) {
        $this->old<?=$relationName.$aggregateName?>-><?=$updateMethodName?>($con);
        $this->old<?=$relationName.$aggregateName?> = null;
    }
}

Size

Lines of code
10