我想实现hibernate外置命名查询,要求实现动态sql/hql,比如USEInfo表中判断页面传的userId是否为空,执行select * from userinfo 还是有where 条件的sql,跪求大神

------解决方案--------------------
hibernate不支持动态hql/sql。你非要弄必须把hibernate内部的mapping.xml的关于命名查询的xml解析自己实现。
------解决方案--------------------
没有这样的需求,因为这种动态sql的我都用mybatis