Hi all. I have two classes, B extends A. It was done like that because they have a lot of common fields, but the objects aren'r really in a hierarchy. Now, when I issue a query "from A" I get objects of both A and B class. Is it possible to disable this, and get only the object of class A? I found about some "polymorphism" attribute on a class, but don't know how it works and if it is remedy for my problem. I know that the best solution would be to completely separate these two classes, but I wonder if implicit inheritance can be switched off in Hibernate.
Thanks.
|