Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #33844 > unrolled thread

JPQL: JOIN on the max value of a list

Started byCecil Westerhof <Cecil@decebal.nl>
First post2016-02-17 04:51 +0100
Last post2016-02-17 04:51 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.java.programmer


Contents

  JPQL: JOIN on the max value of a list Cecil Westerhof <Cecil@decebal.nl> - 2016-02-17 04:51 +0100

#33844 — JPQL: JOIN on the max value of a list

FromCecil Westerhof <Cecil@decebal.nl>
Date2016-02-17 04:51 +0100
SubjectJPQL: JOIN on the max value of a list
Message-ID<87twl8804j.fsf@Equus.decebal.nl>
I am trying something in the lines of:
    SELECT inst
    FROM   instelling inst
    JOIN FETCH inst.aanvragen
    JOIN FETCH inst.aanvragen.beoordelingen

But the problem is that the field aanvragen is a list. So I get:
    JPQL does not allow traversal through multi-valued relation path.
    Try join instead.

I would like the JOIN to take place on the max value of aanvragen. Is
this possible? If so: how?

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

[toc] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web