You can't use associations in the criteria for findBy(), findOneBy(), etc.
In this case you can create a custom method in your repository to do what you 
want. 

--  
Jasper N. Brouwer
(@jaspernbrouwer)


On 21 November 2014 at 21:03:03, Cristian Buitrago ([email protected]) 
wrote:
> Hello,
>  
> I wonder if it is possible to findOneByUserAndCompany ($ user, $ company);
>  
> as I need to bring a user of a company, if I try to bring the user findBy,
> but the roles and permissions that have associated.
>  
> thanks.


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