db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Allen <...@mojavelinux.com>
Subject Re: updating a record
Date Fri, 07 Mar 2003 21:15:37 GMT

Eric Emminger (eric@ericemminger.com) wrote:

> > User user = new User();
> > data.getParameters().setProperties(user); // much easier
> 
> Oops! I just realized this is the Torque list. The above is a Turbine 
> trick and you may not necessarily be using Turbine. In that case, set 
> the properties however you can. The rest of the code still applies. :)
At first I was like, eh?  But then I realized you just meant fill in
the values and I extrapolated.

> 
> > user.setNew(false);
> > user.save(); // save()
> > UserPeer.doUpdate(user); // or use the peer

Excellent, thanks for the tip.  I just wasn't sure if that was
considered kosher or not, but sounds good!

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <dan@mojavelinux.com>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
umm... i guess this is my signature. 8-}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

Mime
View raw message