
Hibernate
xyhwork
Don't cry over spilled milk
展开
-
hibernate纯sql查询结果集映射为DTO(VO,DO)
假设我们现在有一个DTO,其属性包括两张表的属性,我们现在需要将sql语句查询得到的内容转为一个DTO对象,其解决方法如下: String sql = "select u.userName as userName ,p.title as title ,p.addTime as addTime from user as u,post as p where u.id=p.userId" Que转载 2014-05-06 15:27:06 · 4556 阅读 · 0 评论 -
hibernate hql、sql的各种连接的不同写法
引自: http://www.cnblogs.com/cyjch/archive/2012/03/14/2395340.html 纯属转载,如有侵权,请告知删除! inner join(内连接) left outer join(左外连接) right outer join(右外连接) full join (全连转载 2014-12-02 10:40:52 · 2636 阅读 · 0 评论