-->
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: Lazy one to many connection
PostPosted: Mon Nov 28, 2005 11:28 am 
Contributor
Contributor

Joined: Sat Sep 24, 2005 11:25 am
Posts: 198
Okay, I know this is possible, I just can find how to do it.
How do I configure a class' so a one connection is lazy loaded?

Code:
class Post
{
public virtual Blog Blog { get {} set {} }
}


How do I make the Blog property lazy?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 28, 2005 11:44 am 
Senior
Senior

Joined: Sat May 14, 2005 8:40 am
Posts: 130
With defining a proxy in the <class> section of the mapping of Blog:

Code:
<class name="YourNamespace.Blog, YourAssembly" table="blog"
      proxy="YourNamespace.Blog, YourAssembly">
...
</class>


or

Code:
<class name="YourNamespace.Blog, YourAssembly" table="blog" lazy="true">
...
</class>

_________________
Cuyahoga


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 28, 2005 12:48 pm 
Contributor
Contributor

Joined: Sat Sep 24, 2005 11:25 am
Posts: 198
Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 29, 2005 9:57 am 
Contributor
Contributor

Joined: Thu May 12, 2005 9:45 am
Posts: 593
Location: nhibernate.org
Actually, it is a lazy many-to-one :wink:

_________________
Pierre Henri Kuaté.
Get NHibernate in Action Now!


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.