]
Gail Badner resolved HHH-7317.
------------------------------
Resolution: Fixed
Fixed in master.
Boolean values bound to parameters in SQL predicate cause failures
using DB2 with deferPrepares = true
------------------------------------------------------------------------------------------------------
Key: HHH-7317
URL:
https://hibernate.onjira.com/browse/HHH-7317
Project: Hibernate ORM
Issue Type: Bug
Components: core
Reporter: Gail Badner
Assignee: Gail Badner
Fix For: 4.1.4
This is reproduced by
org.hibernate.test.annotations.manytomany.ManyToManyMaxFetchDepth0Test.testCompositePk
using DB2 for query:
select man0_.elder as elder783_0_, man0_.firstName as firstName783_0_, man0_.lastName as
lastName783_0_, man0_.carName as carName783_0_ from Man man0_ where man0_.elder=? and
man0_.firstName=? and man0_.lastName=?
In this query, "elder" is bound as a Boolean value when the column is actually
a smallint.
Setting deferPrepares=false would probably fix this, but that could have an undesirable
impact on performance.
This can be fixed by overriding Dialect.getSqlTypeDescriptorOverride(int sqlCode) for
DB2Dialect to return SmallIntTypeDescriptor.INSTANCE for sqlCode == Types.BOOLEAN. This
works with deferPrepares=true.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: