openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "roger.keays" <>
Subject ON DELETE CASCADE causes OptimisticLockingException
Date Thu, 13 Dec 2007 02:08:17 GMT


Since upgrading to 1.0.0, all my CASCADE DELETE foreign key actions cause an
OptimisticLockingException when you delete the owning entity. This happens
even if @ForeignKey describes the delete action correctly.


@Entity A {
  @OneToMany(cascade=CascadeType.ALL, mappedBy="a")
  List b;

@Entity B {
  A a;

If I delete A when there is a cascading foreign key the exception is thrown.
Without the key, there is no exception.

View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message