![]() |
#2
tblovecj2008-01-18 23:07
|
想将过期的数据资料取出来,用HIBERNATE数据库是ORACLE始终取不出
代码:
Transaction tran = getSession().beginTransaction();
List l = null ;
Date da2 = new Date(System.currentTimeMillis());
String hql = "from InventoryN in where in.ended <?";
Query q = getSession().createQuery(hql);
q.setTimestamp(0, da2 );
l = q.list() ;
();
return l ;