users@glassfish.java.net

Re: Problems with Oracle's CHAR datatype and JPA

From: <glassfish_at_javadesktop.org>
Date: Thu, 10 Jan 2008 11:52:58 PST

More updates:

I can also get correct results if I right pad my parameter value to the desired length (in which case I can use [i]=[/i] instead of [i]like[/i]), but when it tries to do foreign key matching it still fails:

SELECT USERID <...> WHERE (USERID = ?)
        bind => [151504 ] //note the spaces here

but as it goes through the joins . . .

SELECT t1.USERID <...> t1 WHERE ((t0.USERID = ?) <...>
        bind => [151504]

. . . it loses the padding.

I even changed my getter and setter in my entity to right pad just in case.
[Message sent by forum member 'marcusocasey' (marcusocasey)]

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