Hi,
I am trying to figure this error and I have already spend lot of time, Please help me in this.
I have Action class, which looks like this
Code:
@Entity
@Table(name = "BATCH_ACTION")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "ACTN_TYPE", discriminatorType = DiscriminatorType.INTEGER)
public class Action extends BaseObject
{
}
And the subclass which is extends the Action class
Code:
@Entity
@DiscriminatorValue("3")
public class ExtractCompletedAction extends Action
{
}
In my business layer of code, I was creating new action.
Code:
Action newAction = new Action();
And setting all the required attributes.
And when I
retrieve the batch object from database using hibernate createCriteria every thing looks good. It also get the actions based on the discriminator column value. In the above case all having value 3
Problem/Issue
When I try to save the object new action, the type (ACTN_TYPE used on Discriminator column)
has value = 1955883606 in the database.
I was expecting 3 (Since that was there in my DiscriminatorValue value)