-->
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.  [ 1 post ] 
Author Message
 Post subject: Large Collection Performance Issues
PostPosted: Thu Jun 05, 2008 7:52 am 
Newbie

Joined: Tue Apr 29, 2008 6:31 am
Posts: 7
Hey guys,

I have the following relationship: 1 IFormsMetaData to many Info objects. This collection will in the future reach into the 10s of thousands of objects so I need to ensure that when adding to the collection, hibernate doesn't load the whole lot (as happens at the moment)

I am using hibernate 3.2.6 with hsqldb 1.8.0.8 with Spring 2.0.8

IFormsMeta Entity code:

Code:

@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "ifm")
@ContainedIn
@Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE})
public Set<Info> getIforms() {
   if(iforms == null) iforms = new HashSet<Info>();
   return iforms;
}



Info Entity code:

Code:

@ManyToOne(cascade = {CascadeType.PERSIST, CascadeType.REMOVE}, fetch = FetchType.EAGER)
@IndexedEmbedded (depth = 5)
public IFormMetaData getIfm() {
   return ifm;
}



I've had a look at Extra lazy fetching for collections but it doesn't seem to solve the problem....

Any pointers appreciated as despite a lot of searching I've been unable to locate a satisfactory solution to this problem.

Cheers


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

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.