|Subject||Re: [Firebird-Java] Firebird 1.5/Hibernate 2.0|
> See attachedWell... after some changes works for me. In your case you use
which generates "SELECT ... FROM ... WHERE lower(...) = ?" SQL, which in
turn generates an error saying that function LOWER is not known. If I change
code to use Expression.like criteria, Hibernate complains being unable to
set "version" property (it contains NULL in the original database). When I
updated the field to contain 1, everything executed just fine.
However I think I know what is the problem in your case... I assume that you
have used declaration of the LOWER function from the ib_udf.sql which is
DECLARE EXTERNAL FUNCTION lower
RETURNS CSTRING(255) FREE_IT
ENTRY_POINT 'IB_UDF_lower' MODULE_NAME 'ib_udf';
which works only for max. 255 characters. You should have declared it with a
bigger size (just put another value instead of 255, for example 2048), it
should work without any problem then.
You can execute following code in your database:
rdb$field_length = 2048
rdb$field_length = 255
rdb$function_name = 'LOWER'
It will change the max. length of the accepter argument. Please confirm if
it helped in your case.