Index: conf/torque/templates/om/Object.vm
===================================================================
RCS file:
/products/cvs/turbine/turbine/conf/torque/templates/om/Object.vm,v
retrieving revision 1.11
diff -r1.11 Object.vm
569a572
>                 setNew(false);
574d576
<                 setNew(false);


I will check in this fix as soon as I get my code into better
condition.  Unfortunately my Object.vm contains quite a bit code I am
not sure make it back into cvs.  So if anyone wants to check in the fix
go for it.


John 
McNally


Youngho Cho wrote:
> 
> Hi,
> 
> When I generate an Object Model with Torque with option , addSaveMethod=true ,
> 
> Then It generated like
> 
>     /**
>      * Stores the object in the database.  If the object is new,
>      * it inserts it; otherwise an update is performed.
>      */
>     public void save() throws Exception
>     {
> 
>         if (isModified())
>         {
>             if (isNew())
>             {
>                 xxxPeer.doInsert(this);
>             }
>             else
>             {
>                 xxxPeer.doUpdate(this);
>                 setNew(false);
>             }
>         }
> 
>      }
> 
> But It should be
> 
>     /**
>      * Stores the object in the database.  If the object is new,
>      * it inserts it; otherwise an update is performed.
>      */
>     public void save() throws Exception
>     {
> 
>         if (isModified())
>         {
>             if (isNew())
>             {
>                 xxxPeer.doInsert(this);
> +              setNew(false);
>             }
>             else
>             {
>                 xxxPeer.doUpdate(this);
> -              setNew(false);
>             }
>         }
> 
>      }
> 
> Thanks,
> 
> youngho
> N<.nÇ+?·­º¶â?ê'-+-ÂSäSx¢¢dèº{.nÇ+?·­º¶â?ê~X¬·
> +?)àv^,r??yªÜ?m§ÿðà    sSV«r¯yÊ&þÛ«n)ÞãIb²Ü(®H§?Ú ±Ê&üúènW¦²:'ÂSäSx¢om==


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to