openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Thompson <>
Subject openjpa 2.0 and InverseManager=true
Date Thu, 03 Jun 2010 20:49:11 GMT
Hey Folks,

I'm running into an issue upgrading from openjpa 1.2.2 to 2.0 when using
the inverseManager.

The usecase is:

object A has a lazy bidirectional relationship to object B and A also
has a lazy bidirectional relationship to object C.  These are
bidirectional only because it was required to be that way by the jpa 1.0
spec.  we (unfortunately) depended on the inversemanager to deal
managing the inverse.

what seems to be happening is:
an update to object B without properly managing the inverse object A
sets object C's foreign key relationship to to object A to null.  which
orphans it.

if possible, i'm looking for the minimal amount of code change.  ie,
disabling the inversemanager and either updating the relationships to be
uni directional, or else properly managing inverses fixes the problem.
similarly having an actual foreign key where it should be means that at
least data isn't lost.  it's just more labor then i was hoping to
allocate currently - especially when i haven't heard many other users
running into issues upgrading.


View raw message