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.  [ 9 posts ] 
Author Message
 Post subject: how to eclude a collection from a loading
PostPosted: Mon Nov 30, 2009 6:41 am 
Newbie

Joined: Mon Nov 30, 2009 6:32 am
Posts: 6
Hi,

I've a tree of multiple objects but the links with the others classes take a few moment to load.
therefore i would like to exclude an association .

Thanks


Top
 Profile  
 
 Post subject: Re: how to eclude a collection from a loading
PostPosted: Mon Nov 30, 2009 8:45 am 
Pro
Pro

Joined: Tue Aug 26, 2003 8:07 pm
Posts: 229
Location: Brisbane, Australia
lazy="true"?

_________________
Cheers,
Shorn.


Top
 Profile  
 
 Post subject: Re: how to eclude a collection from a loading
PostPosted: Mon Nov 30, 2009 9:52 am 
Newbie

Joined: Mon Nov 30, 2009 6:32 am
Posts: 6
no, lazy="true" and explicit proxy is insufficient..

When i call, by DWR, the class i wait too long... (through the debug log, i can see that "DWR" converts all elements from the collection)

So i would try to exclude the List from the loading (just for this page).


Last edited by Wacked on Mon Nov 30, 2009 9:58 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: how to eclude a collection from a loading
PostPosted: Mon Nov 30, 2009 9:55 am 
Pro
Pro

Joined: Tue Aug 26, 2003 8:07 pm
Posts: 229
Location: Brisbane, Australia
Quote:
So i would try to exclude the List from the loading


Fair enough. Have you tried listing the exclude from the loading?

_________________
Cheers,
Shorn.


Top
 Profile  
 
 Post subject: Re: how to eclude a collection from a loading
PostPosted: Mon Nov 30, 2009 9:59 am 
Newbie

Joined: Mon Nov 30, 2009 6:32 am
Posts: 6
Yes but if that works I would not be more advanced (because i need this collection from this class in other page)

i try, two second.


Top
 Profile  
 
 Post subject: Re: how to eclude a collection from a loading
PostPosted: Mon Nov 30, 2009 10:10 am 
Newbie

Joined: Mon Nov 30, 2009 6:32 am
Posts: 6
Benchmark (load of a tree):

With the collection mapped in myClass.hbm.xml -> 3s
When it's unmapped -> 1.2 sec

EDIT:

collection mapping

<bag name="communications" table="Communication" lazy="true" inverse="true" >
<key column="entityLink"/>
<one-to-many class="org.X.X.Communication"/>
</bag>


Top
 Profile  
 
 Post subject: Re: how to eclude a collection from a loading
PostPosted: Mon Nov 30, 2009 10:23 am 
Pro
Pro

Joined: Tue Aug 26, 2003 8:07 pm
Posts: 229
Location: Brisbane, Australia
You're welcome.

_________________
Cheers,
Shorn.


Top
 Profile  
 
 Post subject: Re: how to eclude a collection from a loading
PostPosted: Mon Nov 30, 2009 10:43 am 
Newbie

Joined: Mon Nov 30, 2009 6:32 am
Posts: 6
But i'm not more advanced, i need this collection from this class in other page.

For the benchmark, i removed the declaration of the collection from the file myClass.hbm.xml ...

But it isn't what i want, i need to exclude the load of a collection in the query.
I don't want to remove this collection from the class.


Top
 Profile  
 
 Post subject: Re: how to eclude a collection from a loading
PostPosted: Tue Dec 01, 2009 5:34 am 
Newbie

Joined: Mon Nov 30, 2009 6:32 am
Posts: 6
up?


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