-->
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: One to Many association when Many == millions
PostPosted: Tue Oct 24, 2006 1:12 am 
Newbie

Joined: Tue Oct 10, 2006 6:42 pm
Posts: 5
Folks,

Looking for general guidance re: annotation implemention for large cardinality one to many associations.

Can't locate any explicit examples in the forums, docs, or books.

Trying to add entities to the association w/o loading the entire assoc into memory, etc. Currently experiencing JVM out of memory errors due to same.

Appreciate your assistance.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 24, 2006 5:09 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Don't map the one-to-many association. What would you do with 1 Mio collection elements? Iterate through them?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 24, 2006 9:58 am 
Newbie

Joined: Tue Oct 10, 2006 6:42 pm
Posts: 5
Exactly, one of the needs is to iterate through such a high cardinality association.

As an example, I need to be able to enumerate all subscribers in a specific geographic region. Thus the one to many (many, many, many...) association. Iterate them all to change a service setting. Query all in the region for a specific setting, etc.

Obviously, such grouping objects (with large associations Sets) are impractical unless the association can be paged.

So now I'm thinking I should implement this as a one to many unidirectional from the child to parent, then use paged queries to enumerate all children of a specific parent group. Avoid the Set on the parent altogether.

Am I on the right track with this?

Cheers


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 24, 2006 11:19 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
http://blog.hibernate.org/cgi-bin/blosx ... ionmapping


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.