-->
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.  [ 2 posts ] 
Author Message
 Post subject: Very Lazy Maps
PostPosted: Tue Oct 21, 2003 12:02 pm 
Newbie

Joined: Thu Oct 16, 2003 5:30 pm
Posts: 3
I'm having some performance issues with maps.

Lets say I have a class User with a map collection.

That collection maps to a class Foo.

For each User, there might be thousands of Foos, but I only need a few at a certain time.

What would be ideal is that whenever I call Map.get it checks to see if it had retrieved that Foo before, if not, go to the database and see if it exists.

Are there any plans to implement this? Is there a workaround besides just embeddeding the logic in a query or doing my on caching?

Thanks,
-Eliot


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 21, 2003 12:35 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
This is the so-called "deep lazy collections" feature. I do not plan this feature. You can do it using a collection filter in Hibernate 2.1:

Code:
s.filter( foo.getMap(), "where index(this) = ?", index, Hibernate.STRING );


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