On Sat, 2006-05-20 at 13:34 -0400, Andrus Adamchik wrote:
> Other adapters address trailing space problem by some combination of  
> a trimming CharType and TrimmingQualifierTranslator (see  
> SybaseAdapter and SQLServerAdapter):

I see this problem w/MS SQL server as well as MS Access. I suspect the
same problem exists with all database types and further that this
problem has nothing to do with trimming trailing space of database
fields.

The primary key is a VARCHAR, so I believe that Cayenne is correctly
translating the VARCHAR to have a trailing space.

The primary key(VARCHAR) in my case is stored *without* the trailing
space. The reference to the primary key in other tables sometimes
have a trailing space which is where the trouble starts since WHERE
"foo"="foo<SPACE>"  will yield a match, whereas ObjectId will not yield
a match in this case. 

>From my limited understanding of the finer points of Cayenne & SQL, I
can arrive at no other conclusion than that ObjectId's concept of
equality should match that of SQL's concept of equality in a WHERE
clause. 




-- 
Øyvind Harboe
http://www.zylin.com

Reply via email to