I have the following OneToMany relationship defined in my entity object. I want to be able to add more II items to the values list.
Code:
@OneToMany(fetch=FetchType.EAGER)
@JoinTable(name="IOV",
joinColumns = @JoinColumn(name="o_id", referencedColumnName="id"),
inverseJoinColumns = @JoinColumn(name="externalId", referencedColumnName="pn")
)
@IndexColumn(name = "position")
@XStreamOmitField
private List<II> values;
However if I add more II items to the values list then the following exception is thrown.
Code:
Batch update returned unexpected row count from update [7]; actual row count: 2; expected: 1; nested exception is org.hibernate.jdbc.BatchedTooManyRowsAffectedException: Batch update returned unexpected row count from update [7]; actual row count: 2; expected: 1
Not sure what the problem is. Any ideas on how I can resolve it.
Thanks.