| RE: [eclipselink-dev] @OneToMany with not nullable foreign key and OUTER JOIN to Secondary Table |
|
Hi Gordon,
Thanks for the answer!
I will try
proposed solution for item 2.
Regarding item 1: bidirectional workaround is of course
an option, but I am quite unhappy with it, because it is necessary to
change domain object model with attribute for technical puprose
only...
Probably there is a way to do it with unidirectional
OneToMany?
Regards,
Andrei. From: eclipselink-dev-bounces@xxxxxxxxxxx [mailto:eclipselink-dev-bounces@xxxxxxxxxxx] On Behalf Of Gordon Yorke Sent: Donnerstag, 16. Juli 2009 15:33 To: Dev mailing list for Eclipse Persistence Services; EclipseLink User Discussions Subject: Re: [eclipselink-dev] @OneToMany with not nullable foreign key and OUTER JOIN to Secondary Table We are looking into the first issue but the easiest workaround for you is to map it as a bidirectional one to many With Item 2 you can register a DescriptorCustomizer for this Entity then on the descriptor's QueryManager set a custom join _expression_ using the outer join "ExpressionBuilder eb = new ExpressionBuilder(); descriptor.getQueryManager().setMultipleTableJoinExpression(eb.getField("EMP.ID").equalsOuterJoin(eb.getField("SECOND.FK")));" --Gordon Andrei Shakirin wrote:
|