Is there any way to use the Criteria API sub query in join clause. I have SQL Like this
Code:
select ud.email as email,ul.last_login as last_login,
ul.login_count as login_count, fb_count, m_count from user_details ud
left outer join user_logins userlogins1_ on ud.user_id=ul.user_id
left outer join
(select count(feedback_id) as fb_count,user_id from user_feedback group by user_id) as uf
on ud.user_id=uf.user_id
left outer join (select count(mapid) as m_count,user_id from maps group by user_id) as m
on ud.user_id=m.user_id order by ud.email asc
I saw some where that Criteria do not support Subquery in join but support only in select or where clause. Is this True?
I am not finding a way form the above to rewrite some other way. Please help/suggest me how to proceed