Hi,
I'm using Java 1.5, Resin 3.0.19, Oracle 10g, and Hibernate 3.2.4.sp1. When I query my VARCHAR2 column with a value containing a dash ("-"), Hibernate is not able to find the value. However, I can execute the query normally in SQL developer and a row is returned. Can someone help me troubleshoot this? I am including what is in my hibernate.log ...
DEBUG [org.hibernate.jdbc.ConnectionManager, resin-tcp-connection-*:8082-9 2009-10-14 13:41:35,854]: opening JDBC connection DEBUG [org.hibernate.SQL, resin-tcp-connection-*:8082-9 2009-10-14 13:41:35,854]: select count(*) as y0_ from DRIVER_MATCHING.IDENTITY this_ where UPPER(this_.mailing_zip5) = UPPER(?) and UPPER(this_.last_name) = UPPER(?) and UPPER(this_.first_name) = UPPER(?) and UPPER(this_.name_suffix) = UPPER(?) and UPPER(this_.mail ing_street) = UPPER(?) and TO_CHAR(this_.dateOfBirth,'dd') = REPLACE(TO_CHAR(?, '00'), ' ', '') and TO_CHAR(this_.dateOfBirth, 'MM') = REPLACE(TO_CHAR(?, '00'), ' ', '') and TO_CHAR(this_.dateOfBirth, 'yyyy') = REPLACE(TO_CHAR(?, '0000'), ' ', '') DEBUG [org.hibernate.jdbc.AbstractBatcher, resin-tcp-connection-*:8082-9 2009-10-14 13:41:35,854]: preparing statement DEBUG [org.hibernate.type.StringType, resin-tcp-connection-*:8082-9 2009-10-14 13:41:35,855]: binding '43210' to parameter: 1 DEBUG [org.hibernate.type.StringType, resin-tcp-connection-*:8082-9 2009-10-14 13:41:35,855]: binding 'LAST-NAME' to parameter: 2 DEBUG [org.hibernate.type.StringType, resin-tcp-connection-*:8082-9 2009-10-14 13:41:35,855]: binding 'FIRST-NAME' to parameter: 3 DEBUG [org.hibernate.type.StringType, resin-tcp-connection-*:8082-9 2009-10-14 13:41:35,855]: binding 'SFIX' to parameter: 4 DEBUG [org.hibernate.type.StringType, resin-tcp-connection-*:8082-9 2009-10-14 13:41:35,855]: binding '123 MAILING STREET' to parameter: 5 DEBUG [org.hibernate.type.IntegerType, resin-tcp-connection-*:8082-9 2009-10-14 13:41:35,855]: binding '1' to parameter: 6 DEBUG [org.hibernate.type.IntegerType, resin-tcp-connection-*:8082-9 2009-10-14 13:41:35,855]: binding '1' to parameter: 7 DEBUG [org.hibernate.type.IntegerType, resin-tcp-connection-*:8082-9 2009-10-14 13:41:35,855]: binding '1969' to parameter: 8 DEBUG [org.hibernate.jdbc.AbstractBatcher, resin-tcp-connection-*:8082-9 2009-10-14 13:41:35,856]: about to open ResultSet (open ResultSets: 0, globally: 0) DEBUG [org.hibernate.loader.Loader, resin-tcp-connection-*:8082-9 2009-10-14 13:41:35,856]: processing result set DEBUG [org.hibernate.loader.Loader, resin-tcp-connection-*:8082-9 2009-10-14 13:41:35,856]: result set row: 0 DEBUG [org.hibernate.loader.Loader, resin-tcp-connection-*:8082-9 2009-10-14 13:41:35,856]: result row: DEBUG [org.hibernate.type.IntegerType, resin-tcp-connection-*:8082-9 2009-10-14 13:41:35,856]: returning '0' as column: y0_ DEBUG [org.hibernate.loader.Loader, resin-tcp-connection-*:8082-9 2009-10-14 13:41:35,856]: done processing result set (1 rows)
Thanks, - Dave
|