Clemens Rüttermann (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=712020%...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNTQyNTQ3MTBl...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16865?atlOrigin=eyJpIjoiNTQyNT...
) HHH-16865 (
https://hibernate.atlassian.net/browse/HHH-16865?atlOrigin=eyJpIjoiNTQyNT...
) Simple multiselect CriteriaQuery fails with "Could not locate TableGroup" (
https://hibernate.atlassian.net/browse/HHH-16865?atlOrigin=eyJpIjoiNTQyNT...
)
Change By: Clemens Rüttermann (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=712020%...
)
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....]
[
https://github.com/TheChronicler/test-case-hibernate-orm6|https://github....]
(
https://hibernate.atlassian.net/browse/HHH-16865#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16865#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100227- sha1:534ec1c )