My preferred way writing this in an action would be:

MyDBObject obj = new MyDBObject();
data.getParameters().setProperties (obj);
obj.save();

Then the save method looks something like

             if (getID() == NEW_ID)
>             {
>                 // Sometimes add some specific code here
>                 MyDBObjectPeer.doInsert (obj);
>             }
>             else
>             {
>                 // Sometimes add some specific code here
>                 MyDBObjectPeer.doUpdate (obj);
>             }





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