I'm a bit confused here. I have an "Accounting Item" (which is a set within a larger object) object that contains a "Worker" object.
Each accounting item is unique, and there is a seperate list of employees. Each accounting item contains one worker and more than one accounting item can contain the same worker.
So its like a one directional aggregate. But I'm having trouble figuring out which hibernate mapping to use.
I tried a one-to-one on just the accounting item, but the schema exporter did not setup a foriegn key at all (I'm guessing it is expecting only one accounting data item per worker, and using the primary key to be the same as the worker primary key). I'd like to avoid just sending a binary serialized object if possible.
Am I just overcomplicating this?
All help is welcome. Thanks ahead of time.
|