Hibernate version: 3.0
Full stack trace of any exception that occurs:
Name and version of the database you are using: Oracle 9i
I wonder if it is possible with hibernate to change the type of a derived class of an object which is already persistent.
In my case, i have the class Customer and two joined Subclass 'PotentialCustomer' and 'BuyingCustomer' derived from 'Customer' with same PK in different tables. The shared attributed are stored in table CUSTOMER some attributes are only stored in BUYING_CUSTOMER or POTENTIAL_CUSTOMER. If the potential customer buys, it should be transferred to a buying customer. I don't see a solution to convert the class without deleting the one and then recreate a new object in the database with new type. But this means a lot of trouble with references which should be obtainted automatically by "casting/converting" the object somehow.
|