Suppose I have inheritance hierarchy SuperClass is Payment, Subclass is CreditPayment,CashPayment.
And I query from hql "from Payment p". It will fetch the records from Payment, CreditPayment and CashPayment. But I want records from only Payments and not from it's subclasses. How to do that. I tried explicit polymorphism. But not working.