src/orm/classes/Field/Entities.php
public function afterEntitySave(ORM_Entity $entity)
    {
        if (in_array('persist', $this->getParam('cascade', array())))
        {
            $table = $this->table->getDriver()->getManager()
                ->getTableByEntityClass($this->getParam('class'));
            if (is_null($table))
            {
                return;
            }
            foreach ($entity->{$this->getName()} as $childEntity)
            {
                /** @var ORM_Entity $childEntity */
                if ($childEntity->getEntityState() == ORM_Entity::IS_NEW)
                {
                    $childEntity->{$this->getParam('reference')} = $entity;
                    $table->persist($childEntity);
                }
            }
        }

        if (in_array('update', $this->getParam('cascade', array())))
        {
            $table = $this->table->getDriver()->getManager()
                ->getTableByEntityClass($this->getParam('class'));
            if (is_null($table))
            {
                return;
            }
            foreach ($entity->{$this->getName()} as $childEntity)
            {
                /** @var ORM_Entity $childEntity */
                if ($childEntity->getEntityState() == ORM_Entity::IS_DIRTY)
                {
                    $table->update($childEntity);
                }
            }
        }
    }
public function afterEntitySave(ORM_Entity $entity)
    {
        if (in_array('persist', $this->getParam('cascade', array())))
        {
            $table = $this->table->getDriver()->getManager()
                ->getTableByEntityClass($this->getParam('class'));
            if (is_null($table))
            {
                return;
            }
            foreach ($entity->{$this->getName()} as $childEntity)
            {
                /** @var ORM_Entity $childEntity */
                if ($childEntity->getEntityState() == ORM_Entity::IS_NEW)
                {
                    $childEntity->{$this->getParam('reference')} = $entity;
                    $table->persist($childEntity);
                }
            }
        }

        if (in_array('update', $this->getParam('cascade', array())))
        {
            $table = $this->table->getDriver()->getManager()
                ->getTableByEntityClass($this->getParam('class'));
            if (is_null($table))
            {
                return;
            }
            foreach ($entity->{$this->getName()} as $childEntity)
            {
                /** @var ORM_Entity $childEntity */
                if ($childEntity->getEntityState() == ORM_Entity::IS_DIRTY)
                {
                    $table->update($childEntity);
                }
            }
        }
    }
Действия, выполняемые после сохранения сущности

@param ORM_Entity $entity