Hi, I am having difficulties with inheritance in hibernate. I have two classes mapped on a table per subclass hierarchy. The two classes are BillingDetails and CreditCard with CreditCard inheriting from BillingDetails. The problem is the following: I have saved an object of type BillingDetails, then I copy its properties to a CreditCard object and when I try to save and update the CreditCard object Hibernate throws an org.hibernate.StaleObjectStateException
Can anyone give me an idea of how to have a BillingDetails at first, and then make it become a CreditCard object.
Thanks in advance...
|