db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gareth Boden <gareth.bo...@egsgroup.com>
Subject Re: Problems with CLOB and Peer.doDelete(obj)
Date Mon, 13 Feb 2006 11:46:27 GMT
> I got a problem with torque3.1.1 when deleting and object using its  
> peer. I think the problem is with the definition of the  
> buildCriteria method.
> In my app code, I got
> SomeTablePeer.doDelete( (SomeTable) obj );
>
> In the BaseSomeTablePeer, in the
> public static Criteria buildCriteria( SomeTable obj )
> method I got the row
> criteria.add(COMMENTS, obj.getComments());
>
> So I understand torque is deleting a row identifying it using all  
> table columns in a where statement, but on SQLServer this can't be  
> done so easily.

You want to just delete it with the primary key, not the whole object:
	SomeTablePeer.doDelete(((SomeTable) obj).getPrimaryKey());

Gareth

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message