Carsten Hammer, I'm not sure you dealt with the similar problem. DB2 has both "substr" and "substring", which are different functions that are not interchangeable due to having different arguments. Before the fix, Hibernate rendered both "substr" and "substring" in HQL as "substr", so it was impossible to use the DB2 "substring" function in HQL. The fix I propose looks at the arguments to "substring" method to determine which function should actually be used. |