开发者

How to use left outer join in hibernate to return collection of object

开发者 https://www.devze.com 2023-03-02 16:44 出处:网络
This is my SQL query with a left join: select a.clientid, a.companyname, a.phone, b.emp_id from bw_clientdetails a

This is my SQL query with a left join:

select 
    a.clientid, a.companyname, a.phone, b.emp_id 
from 
    bw_clientdetails a 
left join 
    bw_client_allocatio开发者_如何学JAVAn b on a.clientid = b.client_id;

How to represent above query using hibernate so that I can use the resulting object list to populate by grid using display tag.


The syntax is very similar to the one of SQL. Have you read the Hibernate reference?

select a.clientId, a.companyName, a.phone, b.empId
from ClientDetails a left join a.clientAllocation b
0

精彩评论

暂无评论...
验证码 换一张
取 消