Example #1
0
 /**
  * @param User $user
  */
 public function save(User $user)
 {
     if (!$user->getId()) {
         $user->setId(null);
         $this->_em->persist($user);
     }
     $this->_em->flush($user);
 }
 /**
  * {@inheritDoc}
  */
 public function setId($id)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setId', array($id));
     return parent::setId($id);
 }