I have a class CustomerProfile which is mapped to a table CUST_PROFILE. We have requirement to maintain the closed profiles in a separate table which will have the same schema. I have read many questions in SO especially the below (which has a answer summarizing many other similar questions )
hibernate two tables per one entity
from which I can understand that it is difficult to acheive the same using annotations other than the MappedSuperClass. but possible using the xml mapping.
The reason i am hesitant to use MappedsuperClass is because CustomerProfile has 17 other table with one to many mapping and we have the same set of tables for closed customer profiles also. So i would end up with (17 + 1 for customer profile) 18 mapped super class, 18 active profile and 18 closed profile classes which is 54 classes.
Is there any other way that this can be achieved without MappedSuperClass when using Annotations.