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
Neelima Yadla
Programmer/Analyst - Score Group
Office : (614) 273-4680
|