Subject Jaybird problems using hibernate
Author Danny García Hernández

We have some problems with sql expression width params, jaybird libs throw a DataTruncation exception when params's data data overflow the field sqllen restriction. Expression width "like" using params don't work fine. Example:

create table Bancos (
entidad varchar(4),
        titulo varchar(100)

select * from Bancos where enticed like ?

Width param's value:

1: Work OK. (select * from Bancos where enticed like '%1%')
11: Work OK. (select * from Bancos where enticed like '%11%')
111: ERROR.  Params value is '%111%', one more character than field definition length.


We are using:

Jaybird. 2.2.3
Jdk 1.6
Hibernate: 2.2.4

We use the Criteria Api to access our Backend, then for us is impossible change to use native sql without params.

Any hints?.