Hibernate version:3.0.1
Name and version of the database you are using:oracle
Following is my code:
....
String hsql = "from Customer c where c.name='测试' ";
Query query = session.createQuery(hsql);
query.list();
....
when excuting,no exception thrown,but no query result return (they should return based the condition c.name='测试')
this is the sql hibernate generate for the hsql:
select customer0_.CUSTOMER_NO as CUSTOMER1_, customer0_.CODE as CODE9_, customer0_.NAME as NAME9_, customer0_.STATUS as STATUS9_, customer0_.LAST_OPE RATOR_NO as LAST5_9_ from CUSTOMER customer0_ where (customer0_.NAME='????')
the chinese characters '测试' in hsql become '????' in sql.
by the way, it's run well in the hibernate2 version.
Thank for you help!
|