Reputation: 7096
Can you have 1 table be referred to by 2 different HBM's mapped to 2 different classes (they are unrelated, basic classes, no inheritance).
I know it may be bad practice because of duplication but it has to do with code maintenance. I'm trying to avoid removing one of the classes.
Thanks,
Upvotes: 2
Views: 1288
Reputation: 570365
Can you have 1 table be referred to by 2 different HBM's mapped to 2 different classes (they are unrelated, basic classes, no inheritance).
Yes you can. Just make sure to include stuff for optimistic locking if you are using optimistic locking.
Upvotes: 2