简体   繁体   中英

How to write a join query in HQL

I have 3 tables in DB.

I want to make join query like this:

from Installment i 
join Payment p on i.vcode=p.Installment_Vcode and p.vcode=:vcode

but when I run it this error happens:

unexpected token: on near line 1, column 47 [from information.Installment i join Payment p on i.vcode=p.Installment_Vcode]

HQL doesn't have an on operator. Joins can only be done on associations between entities , and can have an optional with clause.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM