First of all I wanna thank the administrator of this forum and all people who participate in it, that’s my first question that I post, So let’s take this example of mapping with hibernate,
@Entity
@Inheritance
@DiscriminatorColumn(name="PROJ_TYPE")
@Table(name="PROJECT")
public abstract class Project {
@Id
private long id;
...
}
@Entity
@DiscriminatorValue("L")
public class LargeProject extends Project {
private BigDecimal budget;
}
@Entity
@DiscriminatorValue("S")
public class SmallProject extends Project {
}
So I have one table with discriminator value, I make a function that return a Project from the database with Hql and I wanna know how can I know the discriminator value of this object. Thanks in advance.