开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜