How to convert nested SQL to HQL

前端 未结 4 1557
-上瘾入骨i
-上瘾入骨i 2021-01-02 01:52

I am new to the Hibernate and HQL. I want to write an update query in HQL, whose SQL equivalent is as follows:

update patient set 
      `last_name` = \"new_         


        
4条回答
  •  悲&欢浪女
    2021-01-02 02:19

    update Patient set last_name = :new_last , first_name = :new_first where patient.id = some(select doctor_id from Doctor as doctor where clinic_id = 22 and city = abc_city)  
    

提交回复
热议问题