-->
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: Simpler way of specifying what collections to initialize
PostPosted: Fri Oct 24, 2003 11:16 am 
Beginner
Beginner

Joined: Fri Sep 05, 2003 7:21 am
Posts: 27
Location: Sweden
I thought of a simpler way to specify what parts of a class that should be loaded, or actually, which set/bag/.. (Collection type) properties that should be initialized.

Eg, I thought of something like this. If you have

class Owner {
Set cats;
Set friends;
Set hobbies;
}

then

Session.load(Owner.class, id, "cats", "friends")

would load the Owner with it's set of Cats and Friends but not it's set of Hobbies.

What about it? *I* think it would be nice, but others may have other feelings...discussion welcome.

- Mikael


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 24, 2003 4:30 pm 
Regular
Regular

Joined: Tue Aug 26, 2003 6:59 pm
Posts: 89
Location: Somewhere in the Ghetto
you could just make your own method that will load that object and use Hibernate.initialize()


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 25, 2003 2:22 pm 
Beginner
Beginner

Joined: Fri Sep 05, 2003 7:21 am
Posts: 27
Location: Sweden
Sure, but I was suggesting that this might me somehing that could be interesting to implement in Hibernate itself. I was interested in if others liked the feature - sure, I could extend the Session class myself and use it locally, but that would not benefit others.

- Mikael


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 25, 2003 4:10 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
FWIW, this functionality is already available in the Criteria API.


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.