openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Minor <davemi...@gmail.com>
Subject Re: Inverse relation for MappedBy field using parallel eager fetching
Date Mon, 20 Jul 2009 16:06:24 GMT
I opened a JIRA and submitted a patch:
http://issues.apache.org/jira/browse/OPENJPA-1184

Also, note that I said @MappedBy where I meant @MapKey in the previous email.

>
> -----Original Message-----
> From: David Minor [mailto:daveminor@gmail.com]
> Sent: Friday, July 17, 2009 11:39 AM
> To: users@openjpa.apache.org
> Subject: Inverse relation for MappedBy field using parallel eager
> fetching
>
> Hi,
>
> I seem to have encountered a bug where the inverse relation isn't set
> for a @MappedBy annotated field. In JDBCStoreManager, in
> initializeState() there is a comment:
>
> // The inverse relation can not be set since // we are eagerly loading
> this sm for // a sm owner that is still in the process of //
> initializing itself.
> // Remember owner oid by setIntermediate().
> // The inverse relation is set later by
> // setInverseRelation() when the sm owner is fully // initialized.
>
> But it looks like setInverseRelation() is only looking for instances of
> Collection, rather than Map, and the relation never gets set.
>
> This only happens when you are selecting multiple objects -- the first
> object's MappedBy field will have the inverse relation set in
> initializeState(), but subsequent objects seem to fail as above.
>
> --
> _____________
> David Minor
>
>
>
>



-- 
_____________
David Minor

Mime
View raw message