public void can_populate_parent_collection_lazily_on_select() { using (var session = _factory.OpenSession()) { var department = new Department(); department.Name = "Math"; department.Number = "M100"; department.Description = "Mathematics"; var course = department.CreateCourse("101", "Introduction to Geometry", "Teaches basic concepts and theory of geometry."); var anInstructor = department.CreateInstructor(); anInstructor.Name.FirstName = "Joe"; anInstructor.Name.LastName = "Smith"; session.Save(department); var fromDb = session.Get <Department>(department.Id); // touching the instructors collection causes the lazy load: foreach (var instructor in fromDb.Instructors) { System.Diagnostics.Debug.WriteLine("Instructor: {0} {1} {2}", instructor.Id, instructor.Name.FirstName, instructor.Name.LastName); } Assert.Equal(department.Instructors.Count, fromDb.Instructors.Count); } }