File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes Single Table Inheretance - Multiple Values Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Single Table Inheretance - Multiple Values" Watch "Single Table Inheretance - Multiple Values" New topic

Single Table Inheretance - Multiple Values

Rahul Juneja
Ranch Hand

Joined: Aug 03, 2002
Posts: 425

I am trying to create a discriminator in Hibernate Mapping and i want multiple filtered values in the subclass.

As an example i have a persons class and it has students(S), Employees(E), Players(P) with discriminator column as Type and values as S,E,P.
I want to have a subclass which has Student(S) and Players(P). Is there any way i can do this with discriminator.

Any pointers is appreciated.


Rahul Juneja
ThoughtClicks -
Kuladip Yadav
Ranch Hand

Joined: Jul 30, 2008
Posts: 162

This link may be helpful to you

Inheritance Mapping

I agree. Here's the link:
subject: Single Table Inheretance - Multiple Values
It's not a secret anymore!