I am using Mongo with Spring Data.
I have two (first class) entities (@Documents) Entity1 and Entity2, where Entity1 has a reference (@DBRef) of Entity2 within it. Everything works fine, but when executing derived queries such as :
public List<Entity1> findByEntity2Property1(String property1)
The above query returns no results although there are documents with the given query params. Why is that?