now i have another problem about date ot timestamp.
I change my mapping file with timestamp, now it can save full time to database for me.but how can I select some rows with date condition?
I have a table named T_Test that have a field named TestDate,. I defined this field type="timestamp" and I want use following HQL to select from database:
Code:
Date date = //init with a suitable date
List list = conn.find(
"from com.regical.ecp.db.entity.TransLine line where TerminalDate=?",
date, Hibernate.TIMESTAMP);
but i can select nothing. If i change Hibernate.TIMESTAMP to Hibernate.Date in the find method, I can select several data.
What problem with me?