When trying to executing the following code with hibernate 6.2.5, I get the error {{org.hibernate.sql.ast.SqlTreeCreationException: Could not locate TableGroup - org.hibernate.bugs.TestTbl}} . It is working with 5.6. 25 15
{code:java}CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder(); CriteriaQuery<TestTbl> criteriaQuery = criteriaBuilder.createQuery(TestTbl.class); Root<TestTbl> root = criteriaQuery.from(TestTbl.class);
CriteriaQuery<TestDto> queryMulti = criteriaBuilder.createQuery(TestDto.class); queryMulti.getRoots().add(root);
CriteriaQuery<?> multiselect = queryMulti.multiselect(root.get(TestTbl_.id));
TypedQuery<TestDto> query = (TypedQuery<TestDto>) entityManager.createQuery(multiselect); List<TestDto> resultListIds = query.getResultList();{code}
I created two test repositories from the hibernate-test-case-templates, one for hibernate-5 and one for hibernate-6. [https://github.com/TheChronicler/test-case-hibernate-orm5|https://github.com/TheChronicler/test-case-hibernate-orm5|smart-link] [https://github.com/TheChronicler/test-case-hibernate-orm6|https://github.com/TheChronicler/test-case-hibernate-orm6|smart-link] |
|