I have a special case of mapping classes to tables.
Facts:
1. Let's say I have a DB table called IDENTITY
2. 2 different classes map to this table via 3 discriminator values
3. Discriminator values have significance elsewhere in the application and thus are not solemnly for hibernate mapping purposes
So, the two classes are:
1. ProgramID
2. PersonID
Discriminator value 10 maps to ProgramID
and values 1, 7 map to PersonID
How do I resolve this?
I presume I cannot have a comma delimitated discriminator field in my hibernate mapping for PersonID containing 1 ,7? Correct?
Does this mean I will have to:
1. create two mapping classes
2. both mapping the IDENTITY table to the PersonID class
3. Both having identical field mappings except for the discriminator value will be 1 and 7 respectively?
|