-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: aggregate vs composition and architecture help
PostPosted: Sun Nov 16, 2003 3:19 pm 
Beginner
Beginner

Joined: Sun Nov 16, 2003 3:04 pm
Posts: 24
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.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 17, 2003 3:54 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Sounds like a many-to-one mapping between the account and worker.


Top
 Profile  
 
 Post subject: Thanks!
PostPosted: Mon Nov 17, 2003 2:59 pm 
Beginner
Beginner

Joined: Sun Nov 16, 2003 3:04 pm
Posts: 24
Thank you! Sorry, I'm not much of an architect (I only think one way).


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 17, 2003 9:09 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
No problem - we are all learning.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.