【发布时间】:2011-12-29 14:46:33
【问题描述】:
我正在使用带有 Spring Data 的 Mongo。
我有两个(第一类)实体 (@Documents) Entity1 和 Entity2,其中 Entity1 在其中包含 Entity2 的引用 (@DBRef)。一切正常,但是在执行派生查询时,例如:
public List<Entity1> findByEntity2Property1(String property1)
尽管存在具有给定查询参数的文档,但上述查询未返回任何结果。这是为什么呢?
【问题讨论】:
-
您好,您能找到任何解决方案吗?谢谢。
标签: java spring mongodb spring-data spring-data-document