]
Gail Badner resolved HHH-5164.
------------------------------
Resolution: Rejected
HQL putting quotes around SMALLINT field
----------------------------------------
Key: HHH-5164
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5164
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.1
Environment: Hibernate 3.3.1 using org.hibernate.dialect.DB2Dialect against DB2
v9.1
Reporter: Shawn Kuenzler
HQL query generating a WHERE clause with a mapped column of java type "int" and
datatype "SMALLINT" in DB2. The generated prepared statement inside of
AbstractBatcher.class shows single quotes around the value (i.e. '11'). DB2
complains with a "SQL0401N The data types of the operands for the operation
"=" are not compatible." error. Running the query in the DB2 Command Center
I see it just needs the quotes removed.
I see that in SQLServer 2008, where the same legacy database field has a datatype of
"TINYINT", SQLServer is accepting of the single quoted value in the HQL
statement.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: