|Re: Problems to use order by a null association [message #628629 is a reply to message #610099]
||Thu, 23 September 2010 13:38
| Chris Delahunt
Registered: July 2009
The JPQL "select a from A order by a.b" might work as I believe EclipseLink has optimizations in place to just use the foriegn key. But the spec implies that using a '.' for a relationship should cause an inner join. So to be sure an outer join is used (for instance, if A doesn't have the foreign key), you may want to specify an outer join be used. For example:
"select a from A a outer join a.b b order by b"
Powered by FUDForum
. Page generated in 0.03215 seconds