Hibernate version:3.2.4.sp1
I am trying to format DB2 timestamp value where I want to convert space to "-" and ":" to "." To do so I am extending DB2390Dialect and using following method
Code:
registerFunction("timestamp", new StandardSQLFunction("char(?1)"));
I am expecting that hibernate will convert my following SQL statement
Code:
TABLE_A.FIELD_A as H110_1_,
from
TABLE_A
where
TABLE_A.FIELD_B = XYZ
into
char(TABLE_A.FIELD_A) as H110_1_,
from
TABLE_A
where
TABLE_A.FIELD_B = XYZ
In my POJO I have declared mapping field to String.
I am getting IllegalArgumentException occurred while calling setter method. Is this the correct way to solve timestamp conversion issue?
Read this:
http://hibernate.org/42.html