注册 登录
编程论坛 J2EE论坛

请教::关于Hibernate时间问题

yanhui007 发布于 2008-01-18 10:28, 1398 次点击
想将过期的数据资料取出来,用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 ;
1 回复
#2
tblovecj2008-01-18 23:07
Oracle数据库的where条件查询好像条件只能跟ID
1