I have a table with a PK with char[5] size. When I update with the value "FR" OJB tries to insert "FR ". And so it does an insert instead of an update when I still have a "FR" value in my PK.
You could:
A) comply with char[5] and use the String "FR " with OJB.
B) define the PK as varchar[5] where "FR" would work just fine (not sure wether Ora9i would like varchar as PK though?).
Same thing goes for Oracle and OJB Criteria. If you did critera.addEqualTo("pkAlias", "'FR'") char[5] would give you a miss, but varchar[5] would give a hit.
criteria.addEqualTo("pkAlias", "'FR '") is the only one that would match char[5]
(or addLike("pkAlias", "'FR%'") but that is ambigous).
Cheers, Martin
-- Martin Kal�n Curalia AB Web: http://www.curalia.se Orrspelsv�gen 2B Mail: [EMAIL PROTECTED] SE-182 79 Stocksund Tel: +46-8-410 064 40
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
