public function insert($entity)
    {
        $entity->set($this->_property, $this->getRoot());

        //only add the entity into the entityset if it has
        //already been loaded
        //otherwise don't
        if ($this->getObject()->isLoaded()) {
            $this->getObject()->insert($entity);
        }

        return $entity;
    }
public function insert($entity)
    {
        $entity->set($this->_property, $this->getRoot());

        //only add the entity into the entityset if it has
        //already been loaded
        //otherwise don't
        if ($this->getObject()->isLoaded()) {
            $this->getObject()->insert($entity);
        }

        return $entity;
    }
public function insert ( $ entity ) { $ entity -> set ( $ this -> _property , $ this -> getRoot ( ) ) ; //only add the entity into the entityset if it has //already been loaded //otherwise don't if ( $ this -> getObject ( ) -> isLoaded ( ) ) { $ this -> getObject ( ) -> insert ( $ entity ) ; } return $ entity ; }
Insert an entity to the aggregation.

@see AnObjectSet::insert()
Insert an entity to the aggregation .