Hi all,
I am looking for a bit of 'best practice' advice.
Currently I have the following mapped classes:
Code:
@Inheritance(strategy=InheritanceType.JOINED)
public class Account
Code:
@PrimaryKeyJoinColumn(name="account_id")
public class ParentAccount extends Account
In my system generally 'Accounts' will be saved. However at later dates Accounts may need to be converted to ParentAccounts as they need extra responsibilities that Accounts do not include.
In terms of best practice whats the best way to upgrade a persistent stored item to a subclass?
Would you have to remove the previous item then re-add the account? Or is there another more efficient way of doing this?
Many thanks to all who read I appreciate your help.
Eggsy