On Mon, Jun 8, 2009 at 3:33 PM, Daryl Stultz <[email protected]> wrote:
> Hi all, > > I'm adding OpenJPA to a large application. I'm getting "Optimistic locking > errors". I have no @Version members and I am fine with a "he who commits > last wins" approach. So I set > > <property name="openjpa.LockManager" value="none" /> > > in persistence.xml but it still occurs. > I've got a unit test recreating the problem. I create A with one child B and persist. I load A and delete it (remove). About half the time it is successful. I find that sometimes the delete query for A is issued before the delete for B. And sometimes the reverse. When B is deleted before A, no problem. When A is deleted before B it fails. The foreign key from B to A is set to cascade delete and is not deferred. Do I need to change either of these? -- Daryl Stultz _____________________________________ 6 Degrees Software and Consulting, Inc. http://www.6degrees.com mailto:[email protected]
