dlr 01/10/20 11:27:19
Modified: src/templates/om Peer.vm
Log:
Path by Byron Foster <[EMAIL PROTECTED]>:
When the Id method is autoincrement and a Torque OM object is inserted
the primary key is not known until after the insert. Once Torque
performs the insert it calls the setPrimaryKey method of the OM
object, since the primary key prior to the insert was probably null
the current ObjectKey and the one being set do not match so the
modified flag is set to true. So the quick tour: after an insert is
performed the modified flag falsely indicates the object is modified.
Revision Changes Path
1.5 +2 -0 jakarta-turbine-torque/src/templates/om/Peer.vm
Index: Peer.vm
===================================================================
RCS file: /home/cvs/jakarta-turbine-torque/src/templates/om/Peer.vm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -u -r1.4 -r1.5
--- Peer.vm 2001/10/17 23:38:44 1.4
+++ Peer.vm 2001/10/20 18:27:19 1.5
@@ -646,6 +646,7 @@
obj.setPrimaryKey(doInsert(buildCriteria(obj)));
#end
obj.setNew(false);
+ obj.setModified(false);
}
/**
@@ -680,6 +681,7 @@
obj.setPrimaryKey(doInsert(buildCriteria(obj), dbCon));
#end
obj.setNew(false);
+ obj.setModified(false);
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]