I have beans being populated using constructor based queries as follows.
session.createQuery("select new someBean(someProp1 as abc, someProp2 as bcd, null as cde, someProp3 as cde) from someEntity ").list();
Why should this throws a null pointer exception?
The DB2 database does not seem to support the following: "select (cast(integerProp as string)) from someEntity"
This casting should be database specific, but where do we add this? unlike a dialect class where you can add new functions. I exepected the above hql: cast(integerProp as string) to work as:
sql: rtrim(cast(cast(integerProp as character(200)) as varchar(200)) which works correctly as a DB2 sql query.
rather than cast(integerProp as varchar) which throws a DB2 exception
WHERE DO WE OVERRIDE THIS CONVERSION FOR DB2?
Regards Rama
Last edited by pvradhakrishna on Thu Oct 07, 2010 5:55 pm, edited 2 times in total.
|