How to write subquery in hibernate

后端 未结 1 1037
醉话见心
醉话见心 2021-01-29 01:17

i have SQL query , i don\'t know how to write in hibernate

select lp.lnprdtname,la.lid,la.step 
from mfic.lnapp as la 
left join mfic.lnprdt as lp on lp.lnprdtid         


        
相关标签:
1条回答
  • 2021-01-29 02:04

    As said here: Chapter 14. HQL: The Hibernate Query Language - 14.13. Subqueries

    from DomesticCat as cat
    where cat.name not in (
        select name.nickName from Name as name
    )
    

    Note that HQL subqueries can occur only in the select or where clauses.

    Anyway, I'm not sure it's a good idea to concat so many subqueries in a single statement...

    0 讨论(0)
提交回复
热议问题