我正在尝试为Rental具有多对任意关联的HQL 编写PaymentTypes。
from rental
where not exists(
from PaymentTypes pt where pt.Owner = :rental and type = 'Visa'
)
Owner是任何关联,其中OwnerIdisrental.Id和OwnerType = 'Rental'
不幸的是,我不能SetEntity用作预取租金然后打电话SetEntity会非常昂贵。