Hibernate HQL基础 HQL中的连接
时间:2010-10-10 来源:juxiangwu
与SQL不同,HQL支持持久对象之间的连接查询,包括交叉连接、内连接、左外连接和右外连接。如下表所示:
名称 HQL子句 简写形式 示例
交叉查询 无 无 from Product p Category c
内连接 inner join join from Category c inner join c.products
左外连接 left outer join left join select from Category c left outer join c.products
右外连接 right outer join right join from Category c right outer join c.products
名称 HQL子句 简写形式 示例
交叉查询 无 无 from Product p Category c
内连接 inner join join from Category c inner join c.products
左外连接 left outer join left join select from Category c left outer join c.products
右外连接 right outer join right join from Category c right outer join c.products
相关阅读 更多 +