db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Gordon <rgor...@mwt.net>
Subject save/update problem
Date Fri, 20 Feb 2004 08:14:46 GMT
I am trying to do an update (ie, a save) on a Torque OM object.
I fetched the object in a previous select, change two fields
and now want to update the underlying record. Per everything
I read all I have to do is call save. Nothing is happening.

I am using 3.1.

I have noticed many questions on the archive on problems
involving update, but not many good answers. So, I offer
another question.

When I get way down in:

BaseMyObjPeer.doUpdate(criteria, con)

there is a call made to construct a new Criteria object, the
selectCriteria,  which--without futher manipulation--passed to

BasePeer.doUpdate(selectCriteria, criteria, con)

Within BasePeer, a  keySet() of the selectCriteria's hash entries
is requested BUT this in null--nothing was every done to selectCriteria
except construct. It makes perfect sense that it is null, however, being
so all the meaningful code within BasePeer.doUpdate() is skipped
and the update never takes place. The updated record is not written
to database.

What the heck is going on? How does this ever work if nothing
is ever added to the selectCriteria object so that requesting
a keySet does not return null?


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

View raw message