You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Byron Foster <bf...@base2.cc> on 2001/10/20 15:59:43 UTC

[PATCH] Torque bug fix for modified flag after insert

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.

Thanks,
Byron


Re: [PATCH] Torque bug fix for modified flag after insert

Posted by Daniel Rall <dl...@finemaltcoding.com>.
Byron Foster <bf...@base2.cc> writes:

> 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.

Thanks Byron, committed to HEAD of the jakarta-turbine-torque module.

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org