-->
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.  [ 3 posts ] 
Author Message
 Post subject: How to Add to a Large Collection? (without loading it all!)
PostPosted: Wed Mar 01, 2006 3:22 pm 
Beginner
Beginner

Joined: Wed Jul 21, 2004 6:50 pm
Posts: 27
Hibernate version: 3.0.5

Name and version of the database you are using: Firebird 1.5

Hi,

We have an object that has a lazy-loaded collection which can get up to 6000+ other objects.

I am encountering serious performance problems when I try and add an object to this collection.

We are limited to version 3.0.5 for this release, so can't make use of lazy="extra".

Can anyone share any tips/workarounds on how to do this?

cheers,

David


Top
 Profile  
 
 Post subject: options
PostPosted: Wed Mar 01, 2006 4:55 pm 
Expert
Expert

Joined: Fri Jul 22, 2005 2:42 pm
Posts: 670
Location: Seattle, WA
you could
- try using idbag for the collection;
- use JDBC to insert data in the DB ( make sure there is no parent object in the session cache with session.evict() );

_________________
--------------
Konstantin

SourceLabs - dependable OpenSource systems


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 01, 2006 8:35 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
If you have a bi-directional one-to-many which by-definition is inverse=true then only add the parent to the child and not the collection, eg, many-to-one side only. You could also use a bag for the collection if you have to add it to the collection.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.