Hi João, Please keep mailing list messages in English.
Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 18 August 2014 12:19, João Carlos Santa Ana <[email protected]> wrote: > Salve guys, > Alguém pode explicar como verificar se existência de registro > pelo getReference(). > Pois a variável sempre retorna true; > Se: > $entity = $this->em->getReference($this->entity, $id); > if($entity): > Vai sempre entrar mesmo que o registro com id não exista; > endif; > > diferente de: > $repo = $this->em->getRepository($this->entity ); > $user = $repo->find($id); > > if($user ): > Só entra se encontrar registro com o id; > endif; > > -- > You received this message because you are subscribed to the Google Groups > "doctrine-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/doctrine-user. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/d/optout.
