Hi,
I am using Oralce 10g and Hibernate 3.2.
My table tableA has column id defined as char(24) type, and column last_update_date as Date type, I hope date can show time field.
When I code as :
Code:
Query query = session
.createSQLQuery("select id, last_update_date ts from ltableA where rownum <= 1");
List<Object[]> result = query.list();
the id has only one CHAR, and ts has only yyyy-mm-dd to be shown.
and if :
Code:
Query query = session
.createSQLQuery("select id, last_update_date ts from ltableA where rownum <= 1")
.addScalar("id", Hibernate.STRING).addScalar("ts", Hibernate.TIMESTAMP);
List<Object[]> result = query.list();
result is as respected.
My question is:
if I want use
Code:
select * from tableA
...
List<String[]> result = query.list();
and force all field of char mapping to String, and all field of Data as Timestamp.
How can I?
Thanks!