db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Eade <se...@backstagetech.com.au>
Subject Re: how to use Peer.doUpdate(object)
Date Wed, 15 Jan 2003 11:37:01 GMT
I suspect the problem is that the peer thinks it is a new record rather than
an update.

Try going:

    object.setNew(false);
    object.setModified(true);

...or something like that.

HTH,

Scott
-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au
.Mac Chat/AIM: seade at mac dot com


On 15/01/2003 10:12 PM, "Marc Lustig" <mail@marclustig.com> wrote:

> Hi,
> 
> is there a bug in ObjectPeer.doUpdate(myobject) ?
> 
> What I'm doing is creating a new Object, setting the PK (of an existing row)
> and the fields.
> Now when running Peer.doUpdate(myobject) torque reports
> 867278 [Thread-4] DEBUG util.BasePeer  - BasePeer.doUpdate:
> whereClause=PROJEKT_
> ID IS NULL
> 
> Isn't torque supposed to build the WHERE clause automatically based on the
> PK ?
> 
> If not, then the whole method Peer.doUpdate(myobject) is useless, isn't it?
> 
> Greetings
> Marc
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:turbine-torque-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:turbine-torque-user-help@jakarta.apache.org>
> 


Mime
View raw message