This content has been marked as final.
Show 2 replies
-
1. Re: How to use multiple entity Inheritance
cash1981 Aug 2, 2010 6:55 AM (in response to logan)There are lots of examples online on how to do this. Just google
JPA inheritance
.@Entity @Inheritance(strategy = InheritanceType.SINGLE_TABLE) // optional annotation as this is default @DiscriminatorColumn(name = "apType", discriminatorType = DiscriminatorType.STRING, length = 255) @DiscriminatorValue("AP") public class ApplicationProcess
@Entity @DiscriminatorValue("APS") public class ApplicationProcessScheme extends ApplicationProcess
-
2. Re: How to use multiple entity Inheritance
logan Aug 2, 2010 9:20 AM (in response to logan)Thanks, but I want to use DIFFERENT strategies!
example:
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
public class ApplicationProcess
@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public class ApplicationProcessScheme extends ApplicationProcess