Question on jpa joined table inheritance

Posted by soontobeared on Stack Overflow See other posts from Stack Overflow or by soontobeared
Published on 2010-04-07T18:55:24Z Indexed on 2010/04/07 23:13 UTC
Read the original article Hit count: 192

Filed under:

Hi, The 'DiscriminatorColumn' annotation isn't creating any column in my parent entity. Where am I going wrong ?

Here's my code

@Entity
@Inheritance(strategy=InheritanceType.JOINED)
@DiscriminatorColumn(name="TYPE", discriminatorType=DiscriminatorType.STRING,length=20)
public class WorkUnit extends BaseEntityClass implements Serializable{

@Entity
@DiscriminatorValue(value="G")
@Table(name="Group_")
@PrimaryKeyJoinColumn
public class Group extends WorkUnit implements Serializable{

© Stack Overflow or respective owner

Related posts about jpa