Community
Participate
Working Groups
Hello I'm trying to use the TREAT JPQL feature in this query : SELECT DISTINCT a FROM Shop s JOIN TREAT(shop.products AS Book) b JOIN b.author a WHERE s = :shop The goal is to get all distinct book authors sold in a given shop. This query should return a List of "distinct" Author, but I get a List of Long with only IDs of books. Is it a bug, or a known limitation of TREAT ? Thanks.
I've forgotten to add that the generated SQL statement looks good, SELECT contains all Author column.
errata: the List contains IDs of Author, not books. Sorry
Setting target and priority. See the following page for the meanings of these fields: http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines Community: Please vote for this bug if it is important to you. Votes are one of the main criteria we use to determine which bugs to fix next.
Treat support is being worked on in bug 374771 for JPA 2.1 and still has issues in what is currently available. I've made this bug dependent on 374771 so that this use case is included when support is finalized.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink