I do single mapping for my database,
and specify the annotation as blow
@DiscriminatorColumn(name = "TYPE", discriminatorType = DiscriminatorType.STRING)
my question is : can we get the value when we doing codeing?
@DiscriminatorColumn(name = "TYPE", discriminatorType = DiscriminatorType.STRING)
class A {
....
}
@DiscriminatorValue("B")
class B extend A{
..
}
in the database, i can see there is a column "type", and holding value there,
but how can i get the its value,
is it that there are anyway i can get the value like this b.getType()???
thanks .
|