db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Emminger <e...@ericemminger.com>
Subject Re: updating a record
Date Fri, 07 Mar 2003 15:28:07 GMT
> So....my question is, is it always necessary to retrieve a record
> before doing save() in order to make it update a record which
> already exists?  If so, would I do something like:

No. Your could do the following.

User user = new User();
data.getParameters().setProperties(user); // much easier
user.setNew(false);
user.save(); // save()
UserPeer.doUpdate(user); // or use the peer

Try that.

Eric


Mime
View raw message