diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java index 5edeb8a82..4e264dd67 100644 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java @@ -2778,7 +2778,7 @@ public class StateManagerImpl // BEFORE_PERSIST is handled during Broker.persist and Broker.attach if (isDeleted()) fireLifecycleEvent(LifecycleEvent.BEFORE_DELETE); - else + else if (!(isNew() && !isFlushed())) fireLifecycleEvent(LifecycleEvent.BEFORE_UPDATE); _flags |= FLAG_PRE_FLUSHED; }