用的是纯hibernate没有用框架的Spring,想查找某一天的所有记录,代码是这样写的
1、List<Record> rr=se.createQuery("from Record where Recorddate like '"+ydate+"%'").list();
Record是我的实体类,
2、List<Record> rr=se.createQuery("from Record ).list();这样程序就是好的,是我想要的结果
3、List<Record> r=se.createSQLQuery("select *from Record where date like '" +ydate+" %'").list();用这个sql语句得到的在jsp页面上用不了${***.**}取值就是错误,,谢谢大家了。
1、List<Record> rr=se.createQuery("from Record where Recorddate like '"+ydate+"%'").list();
Record是我的实体类,
2、List<Record> rr=se.createQuery("from Record ).list();这样程序就是好的,是我想要的结果
3、List<Record> r=se.createSQLQuery("select *from Record where date like '" +ydate+" %'").list();用这个sql语句得到的在jsp页面上用不了${***.**}取值就是错误,,谢谢大家了。









