-->
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: Best practice for full initialization of object?
PostPosted: Sun Jul 17, 2005 5:01 pm 
Newbie

Joined: Thu Jul 21, 2005 3:02 am
Posts: 11
Are there any best practices for a deep initialization of an object with several collections and several single associations.

After the initialization I would like to access the collections and associations through the root object.

As a further restriction I only want to extract elements from CollectionA where some criterias are true?

So after initialization I would lke to do the following in a disconnected manner (Session is closed)

ClassA.CollectionA[]
ClassA.CollectionB[]
ClassA.ClassB


How do I initialize ClassA to obtain this. Its for a windows application.

Regards Morten


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 18, 2005 4:59 am 
Regular
Regular

Joined: Mon Jul 18, 2005 4:10 am
Posts: 92
Location: Poland
Collections can be initialized with NHibernateUtil.Initialize(ClassA.-collection-).
As I know, you don't need to initialize ClassA.ClassB to use it without session.

I think it is not possible to initialize only a part of collecion - maybe you can try session.Filter to get "detached" list of objects from collection.

_________________
michal


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.