• 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.


 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!