jpa - JPQL LEFT JOIN: is the collection member variable condition evaluated against all members? -


suppose have jpql query this:

select p   parent p   left outer join p.children child  p.children empty     or child.x = 'y' 

i parent instances returned in of following cases:

  • the parent has no children
  • the parent has @ least 1 child x equal y

according jpa specification, should query above want? or must drag out exists-and-subquery-and-in machinery?

yes, query want, no matter jpa implementation. don't see room doubt, although can feel don't like: table children joined twice. in imho jpa implementation should make 2 db queries if needed in order return correct data.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -