When querying already persisted entities (even the query is selecting on a primary key only) without hibernate-search-orm dependency the _"java.lang.IllegalArgumentException: HQL100001: The type <Entity Type> is not an indexed entity"_ is thrown. Maybe I am wrong, but my understanding is that indexing is required only if the query includes non key elements.
If hibernate-search-orm dependency is added to enable indexing, the _"javax.persistence.PersistenceException: org.hibernate.HibernateException: HHH000142: Javassist Enhancement failed: <Entity Type>"_ is thrown.
[dadrus/jpa-unit CleanupTest |https://github.com/dadrus/jpa-unit/blob/bfaefa8b03c27b84981cf3786c505296543ecbd1/integration-test/jpa-cassandra-hibernate-ogm-test/src/test/java/eu/drus/jpa/unit/test/CleanupTest.java] can be used to reproduce the issues. the test method implementing the aforementioned query is test2 implemented in the base class of the referenced test. hibernate-search-orm dependency can be enabled/disabled in the [dadrus/jpa-unit test-model|https://github.com/dadrus/jpa-unit/tree/bfaefa8b03c27b84981cf3786c505296543ecbd1/integration-test/test-model] subproject.
Am I doing something wrong or have indeed encountered multiple bugs here?
To run the test a running cassandra instance with a _"test"_ keyspace is required. Please see the _"persistence.xml"_ of the referenced test project for additional configuration options. |
|