首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

hibernate兑现多表关联查询的例子

2012-06-28 
hibernate实现多表关联查询的例子hibernate实现多表关联查询的例子:1.HQL语句:select new cn.u6.contoller

hibernate实现多表关联查询的例子

hibernate实现多表关联查询的例子:

1.HQL语句:

select new cn.u6.contoller.bean.UserBean(model1.userId,model1.userName,model1.passWord,model1.isEnable,model2.groupName) from User as model1, Group as model2, UserGroup as model3 where model1.userId=model3.userId and model3.groupId=model2.groupId

?

2.UserBean相当大家所说的VO即值对象,里面必须要有对应的构造方法

?

热点排行