• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Querying from inheritance hierarchy

 
Sagar Kale
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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.


 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic