db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neelima Yadla" <Neelima.Ya...@CBC-Companies.com>
Subject doChange() problem in torque 3.2
Date Wed, 06 Jun 2007 15:31:46 GMT
I have upgraded torque from 3.0 to 3.2 and also tdk from 2.2 to 2.3, the
doChange() is always giving me error " ... is a key value cannot be
updated".

 

ValidOptionPeer.doUpdate(selectCriteria, criteria);

 

Where my criteria is as follows,

 

 

if ((validOptionName != null) && (validOptionName.length() > 0))

                    criteria.add(ValidOptionPeer.OPTION_NAME, (Object)
validOptionName, Criteria.LIKE);

                if ((validOptionDescription != null) &&
(validOptionDescription.length() > 0))

                    criteria.add(ValidOptionPeer.OPTION_DESCRIPTION,
(Object) validOptionDescription, Criteria.LIKE);

 

OPTION_NAME is the primary key in my table. As per torque document, we
have to give only set values in criteria but I didn't get how the above
is to be work in torque 3.0. If I remove the Option_name from
criteria.add it works fine but not getting any error message if user
tries to modify the option_name.

 

Also, how to handle multiple primary key fields in
doUpdate(selectCriteria, criteria);

 

I appreciate any help.

 

Thanks,

 

Neelima

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message