Hi All,
I tried to combined two kind of inheritance (JOINED and SINGLE_TABLE), but it doesn't work. It seems that "Discriminator" annotations are ignored. Look at the sample below :
Code:
@Entity
@Inheritance(strategy = InheritanceType.JOINED)
Class A{
//code
}
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "INSTRUMENT", discriminatorType = DiscriminatorType.STRING)
@DiscriminatorValue("All")
Class B extends A{
//code
}
@Entity
@DiscriminatorValue("FutureSpread")
Class C extends B{
//code
}
This example create 3 tables (A,B and C) instead of 2 (A and B) by using hibernate maven plugin (mvn hibernate3:hbm2ddl)
What do you think about this?
Thanks in advance.