You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by ol...@apache.org on 2004/05/15 22:07:13 UTC
cvs commit: db-ojb/src/java/org/apache/ojb/otm/core ConcreteEditingContext.java
olegnitz 2004/05/15 13:07:13
Modified: src/java/org/apache/ojb/otm/core ConcreteEditingContext.java
Log:
Manage correctly the "insert after delete" situation
Revision Changes Path
1.46 +7 -1 db-ojb/src/java/org/apache/ojb/otm/core/ConcreteEditingContext.java
Index: ConcreteEditingContext.java
===================================================================
RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/otm/core/ConcreteEditingContext.java,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- ConcreteEditingContext.java 12 Apr 2004 16:32:41 -0000 1.45
+++ ConcreteEditingContext.java 15 May 2004 20:07:13 -0000 1.46
@@ -124,7 +124,13 @@
public void insert(Identity oid, Object userObject, int lock)
throws LockingException
{
- insertInternal(oid, userObject, lock, true, null, new Stack());
+ ContextEntry entry;
+
+ entry = insertInternal(oid, userObject, lock, true, null, new Stack());
+ if ((entry != null) && entry.state.needsDelete()) {
+ // Undelete it
+ entry.state = State.PERSISTENT_CLEAN;
+ }
}
private ContextEntry insertInternal(Identity oid, Object userObject,
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org