I'm currently learning NHibernate and I would like to data-bind to Web controls (i.e. GridView).
In my current example I am using Fluent NHibernate to map two tables to their business objects (Project and ProjectStatus). I also have a "Project has a ProjectStatus" (many-to-one) relationship.
Structure of Project class:
Project.ID
Project.Name
Project.ProjectStatus.Name
Project.ProjectStatus.Description
When I bind a list of Project objects (with lazy="proxy") to a GridView, the GridView does not trigger the load of the referenced table. As a result the fields Name and Description of ProjectStatus are left out by the GridView control.
Is there a way of having true lazy loading in combination with a data-bound GridView?
Thanks in advance.