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.