NHibernate Forge
The official new home for the NHibernate for .NET community

Comments: Lazy loading - eager loading

Wiki Page Hierarchy

Pages

Page Details

First published by:
gabriel.schenker
on 09-06-2008
Last revision by:
MarkCranness
on 07-08-2011
5 people found this article useful.
Comments (11)
History (8)

Lazy loading - eager loading

Sort by: Published Date | Most Recent | Most Useful
1 2 3 Next >
By: m9525 Posted on 04-28-2009 15:24

The tutorial guides me correctly to get existing value. But not on creating a new one with one-to-many.

It seems that you are sure _order.OrderLines will never be null.

Is there any specific setting to do so that _order.OrderLines will not null when specifying a new Order? Definitely not by adding OrderLines = new ICollection<OrderLine>() in Order constructor. Mine failed miserably.

           _order = new Order

                       {

                           OrderNumber = "o-100-001",

                           OrderDate = DateTime.Today,

                           Customer = customer

                       };

           _order.OrderLines.Add(line1);

By: m9525 Posted on 04-29-2009 6:35

Stupid comment is revised. Must read advance topic and put another Wiki page.

Will never null if class is defined properly with HashedSet and ISet from Iesi.Collections.

private ISet parts = new HashedSet();

public ISet Parts

{

get { return parts; }

set { parts = value; }

}

(Source: NHibernate Reference)

By: xiha37 Posted on 01-12-2011 23:50
0% of people found this useful

This is some very valueable information, thank you very much.

<a href="http://www.jihoy.com">free advertising</a> |<a href="www.jihoy.com/.../a>|<a href="http://www.simplyrest.com">sleep number bed</a>

By: Evelyn Roberts Posted on 03-11-2011 17:31
0% of people found this useful

finally i got this code that i've been looking for

<a href="www.availhosting.com/reseller_web_hosting_plans.html">whm reseller hosting</a>

By: john3366 Posted on 03-28-2011 17:23
0% of people found this useful

I was just searching for this now finally i got it.thanks for sharing such a nice info.

watchmoviesonlin9.blogspot.com |

<a href="watchmoviesonlin9.blogspot.com/">watchmoviesonlin9.blogspot.com</a> |

<a href="watchmoviesonlin9.blogspot.com/">Watch Movies Online</a> |

<a href="watchmoviesonlin9.blogspot.com/">Online Movies Megavideo</a>

Powered by Community Server (Commercial Edition), by Telligent Systems