hello I have a problem with inheritance in EJB. I show you my code after
@Entity
@Inheritance(strategy=InheritanceType.JOINED)
@DiscriminatorColumn(name="PROJ_TYPE")
@Table(name="PROJECT")
public abstract class Project {
@Id
private long id;
...
}
@Entity
@DiscriminatorValue("L");
@Table(name="LARGEPROJECT")
public class LargeProject extends Project {
private BigDecimal budget;
}
@Entity
@DiscriminatorValue("S");
@Table(name="SMALLPROJECT")
public class SmallProject extends Project {
}
how to get the value of
PROJ_TYPE
. the only solution that I use nativeQuery ,but is there another solution???
sorry for my english and thank you in advance