| Your test case does limit the number of results with: queri.setMaxResults(10). When that line is commented out, the warning is not logged. More importantly, your named query is on a class that is a mapped superclass. JPA 2.1, 2.11.2 Mapped Superclasses, says: "A mapped superclass, unlike an entity, is not queryable and must not be passed as an argument to EntityManager or Query operations." Hibernate should throw an exception in this case. |