2009/11/11 Fluff <[email protected]>:
>
> Hi,
>
> I am pretty new to NHibernate and have been playing around with it to
> see how it works.  It looks pretty good and I have got most things
> working but I have come accross a lazy loading thing that I need
> clarifying.
>
> I have a one to many relationship and I am creating an instance of the
> "many" class and an instance of the "one" class which is a child of
> the "many" class.

Hmm.... normally it would be the child that is the "many"-side. One
parent has many children.

> Now, as far as I can tell I have wired up the
> mapping files properly and when I save the instance of the "many"

Maybe you have, maybe you don't... Without posting your mappings we
can't verify. :)

> class to the database the cascade saves the instance of the "one"
> class as well.  That's great. However when I pull everything back from
> the database the instance of the "one" class has no data in it.  So I
> thought OK it's doing it's lazy loading thing and if I access the data
> in the class Nhibernate will load it. Apparantly not, and I can't get
> it to load the data unless I set lazy to false on the "one" class
> mapping file.  Then it all works.  As far as I can tell the session is
> still open so the lazy loading thing should work but as I said I am
> new to this.
>
> Any help would be appreciated.
>


/Oskar

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to