users@glassfish.java.net

Re: RE: Problems with Oracle's CHAR datatype and JPA

From: <glassfish_at_javadesktop.org>
Date: Fri, 11 Jan 2008 03:32:05 PST

The foreign keys are the same: CHAR(32).

Here is basically the SQL that is being generated:

select <fields> from table1 a, table2 b where a.field1 = 'abc &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' and a.field1 = b.fk1;

Now, I have to add the right padding to the field1 value but when it JPA looks in table2 for that value, it has trimmed it and is now looking for just 'abc' which it cannot find.
[Message sent by forum member 'marcusocasey' (marcusocasey)]

http://forums.java.net/jive/thread.jspa?messageID=253377