I have a class defined as
@Entity
@Table(name = "user_product")
@Inheritance(strategy = InheritanceType.JOINED)
public class UserProduct implements Serializable {
private Integer productid;
}
then I have a child class defined as
@Entity
@PrimaryKeyJoinColumn(name = "id", referencedColumnName = "productid")
public class MyProduct extends UserProduct implements Serializable {
private Integer id;
}
How do I delete MyProduct without deleting its parent? The parent needs
to be just updated, but not deleted.
When I try to set a value and merge UserProduct, and then delete
MyProduct I get "An optimistic lock violation was detected when flushing
object instance...".
Help is very much appreciated.