Hello,

Today I ran into the following problem:

1.  I have an entity with a 'note' attribute which uses the 'longText' 
prototype from (PostgreSQL) ERPrototypes.  'longText' has external type 
VARCHAR, and data type 'String (RTRIM) - String c'.  'note' is an attribute 
used for locking.

2.  A user has apparently entered some text into the 'note' attribute of an EO 
with a trailing space.  The trailing space made it to the database.  Just by a 
stroke of luck, I managed to see it while nosing around with psql.  (If I 
hadn't, I imagine I'd still be scratching my head.)

3.  The WHERE clause generated at update time checks for that string _without a 
trailing space_.

4.  An optimistic locking failure ensues.

Is this expected?  What does the 'RTRIM' in that data type mean—that is, _when_ 
is there trimming?  I take it there's no trimming for an INSERT, or that 
trailing space wouldn't have made it out to the database.  As a workaround, I 
was going to unselect 'note' as an attribute used for locking.


-- 
Paul.

http://logicsquad.net/


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to