Open lukasj opened 10 years ago
@glassfishrobot Commented Reported by c.beikov
@glassfishrobot Commented This issue was imported from java.net JIRA JPA_SPEC-90
FWIW Hibernate 6.0 implements support for this in HQL and the JPA Criteria API extension. If anyone is willing to work on the spec parts, Hibernate can serve as a compatible implementation.
SQL-92 introduced the row value constructor and JPA should support it. Even though some databases do not support the syntax of SQL-92, it can be emulated as has been shown by JOOQ:
Hibernate even supports that syntax already as document here: https://docs.jboss.org/hibernate/orm/4.2/manual/en-US/html_single/#queryhql-tuple
The changes in the JPQL BNF would require to copy the following rules and giving the copies a suffix like '_1'.
Then transform the original rules like the following where R is the respecitve rule name
Of course the naming is stupid but it allows this generic transformation description.
Null comparison and IN expressions follow the same scheme
And finally the subquery should also be able to have more than one select item.