|Re: Left outer join on a unidirectional many to one mapping [message #519383 is a reply to message #518116]
||Mon, 08 March 2010 11:52
| James Sutherland
Registered: July 2009
Location: Ottawa, Canada
That is what,|
"Select b, a from A a left join a.b b"
would generate? I assume you want "B b LEFT OUTER JOIN A a" though.
I guess there is no way to do this in JPA without adding the bidirectional relationship, or using native SQL.
In EclipseLink, you can add a OneToOneQueryKey that allows you to define a relationship without having a mapping for it. You can then use the query key in EclipseLink Expression queries. Unfortunately, query keys are not currently supported in JPQL queries (please log a bug for this and vote for it).
James : Wiki : Book : Blog : Twitter
Powered by FUDForum
. Page generated in 0.02505 seconds