Did you use the right namespace for Adresse? 

It is now looking in the Application\Sonata\UserBundle\Entity\ namespaceand 
probably is in the 
Application\Sonata\AdresseBundle\Entity\ namespace. In that case you should 
probably have something like targetEntity="\\ Application\\Sonata\\
AdresseBundle\\Entity\\Adresse" in your mapping. Just guessing as I'm (not 
yet) so well versed in Symfony.


On Tuesday, 22 April 2014 13:38:25 UTC+2, Chargui Taieb wrote:
>
> i have a problem in doctrine reference of a foreign key from 
>
> src/Application/Sonata/UserBundle that has the foreighn key  that 
> reference to /src/Acme/AdresseBundle 
>
> so i got this error :
>  [Doctrine\ORM\Mapping\MappingException] The target-entity 
> Application\Sonata\UserBundle\Entity\Adresse cannot be found in 
> 'Application\Sonata\UserBundle\Entity\User#idadresse' 
>
> it logic that doctrine show this error cause the two entity are not in the 
> same Bundle so how i can reference to 
>
> 'Application\Sonata\UserBundle\Entity\Adresse '
>
>  from 'src/Application/Sonata/UserBundle' 
>

-- 
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.

Reply via email to