I am a new hibernate user retro-fitting hibernate into an existing system. This is my problem:
ClassA has a one to many relationship with Something where Something is stored in a table called ClassASomethings.
ClassB has a one to many relationship with Something where Something is stored in a table called ClassBSomethings.
Since this is an existing system we would prefer not to refactor this somewhat odd situation. Rather, we would like to somehow tell hibernate that when it is perisisting ClassA that it's Somethings should be stored in table ClassASomethings, and when persisting ClassB that it's Somethings should be stored in table ClassBSomethings.
Any help is much appreciated!
Thanks
Brian
|