I have an Entity which has a User mapped as a @DBRef, something like:
When Entity is stored in Mongo I correctly get something like:
Now in my EntityRepository I added a findByUser(User user) which fails creating this query:
The generated query would be correct if User wouldn't be stored as a DBRef.
I don't think this is the expected behavior but if it is, it should be stated in the documentation (I couldn't find anything about that).