So, given what we would logically think this in the database:
Then, "abc"is not a match.
" abc" is not a match.
"abc " IS a match.
Here's a shot in the dark. Is any part of your application setting BIDI parameters? Some languages read right to left, some left to right? Is there any way your database has a right to left BIDI setting somewhere that is effecting data before it is input into the database?
Thanks Cameron for the quick reply. My DB is DB2zOS version 8 where all the data with type CHAR are stored as right padded. Hibernate does not have any problem in doing find by primary key(internally it trims the spaces)
But it is not able to retrieve the associated rows in the other(N side of an 1..N relationship) table.
Run away! Run away! Here, take this tiny ad with you: