Hibernate搜索5.5.2 在测试centos7时,我们从集成测试中得到了这个例外 (除了centos7而不是6,我们没有改变任何东西。)
org.hibernate.search.exception.AssertionFailure: An entity got loaded even though it was not part of the EntityInfo list
at org.hibernate.search.query.hibernate.impl.CriteriaObjectInitializer.initializeObjects(CriteriaObjectInitializer.java:95)
at org.hibernate.search.query.hibernate.impl.QueryLoader.executeLoad(QueryLoader.java:88)
at org.hibernate.search.query.hibernate.impl.AbstractLoader.load(AbstractLoader.java:58)
at org.hibernate.search.query.hibernate.impl.FullTextQueryImpl.list(FullTextQueryImpl.java:201)
at org.hibernate.search.jpa.impl.FullTextQueryImpl.getResultList(FullTextQueryImpl.java:153)
你知道是什么原因引起的吗?
答案 0 :(得分:0)
这在我的项目中发生的原因:
因此它在索引中找到一种实体类型,而在DB中找到另一种实体类型,并抛出了此错误。