[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-5164) HQL putting quotes around SMALLINT field

Gail Badner (JIRA) noreply at atlassian.com
Tue May 4 17:53:06 EDT 2010


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gail Badner closed HHH-5164.
----------------------------


> 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: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list