| 
							
					| Beginner |  
					|  |  Joined: Tue Mar 17, 2009 12:19 pm
 Posts: 22
 | 
				
					| Hibernate 3.3.1 using org.hibernate.dialect.DB2Dialect
 I have a HQL query generating a WHERE clause with a mapped column of java type "int" and datatype "SMALLINT" in DB2.  Looking at the prepared statement inside of Hibernate's AbstractBatcher.class I see that it has placed 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, where the same legacy database field has a datatype of "TINYINT", SQLServer is accepting of the single quoted value in the HQL statement.
 
 Is there something I can do to remove the single quoting of the value?  Shouldn't the dialect handle this?
 
 Thanks
 
 
 |  |