我最近遇到过hibernate+oracle查询时用junit工具测试时返回的list对象总为空是什么问题。
String hql=from Otable from c;
Query cc=sesson.cretequeary(hql);
List list=cc.list();//list总是null,是什么原因,希望个位大家做个解释,谢谢
String hql=from Otable from c;
Query cc=sesson.cretequeary(hql);
List list=cc.list();//list总是null,是什么原因,希望个位大家做个解释,谢谢
写成String hql="from Otable"
或者String hql="from Otable as ot where "+条件
试试看吧
这是什么意思?
写错了吧 后面的from多了吧