I am using Mongo with Spring data.
I have two (first class) entities (@Documents) Entity1 and Entity2, where Entity1 has a link (@DBRef) Entity2 inside it. Everything works fine, but when performing derived queries, such as:
public List<Entity1> findByEntity2Property1(String property1)
The above query does not return results, although there are documents with the specified query parameters. Why is this?
Saket source share