public function insert(array $data) { $maquina = new clienteService ( $data ); $cliente = $this->em->getReference ( "Pc_help\Entity\Cliente", $data ['id'] ); $maquina->setCliente ( $cliente ); $this->em->persist ( $maquina ); $this->em->flush (); return $maquina; }
/** * {@inheritDoc} */ public function toArray() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'toArray', array()); return parent::toArray(); }