给出以下类结构:
B=3.0515;
b=1.18632*10^5;
a=.017;
r=.054;
p=5931617;
solution = fzero(@(x) test(x,B,b,a,r,p),5000000)
并希望使用NHibernate来查询基于学校的学生。 例如:
class School {
}
class Teacher {
School School {get;set;} // many-to-one key = Teacher.SchoolID
}
class Student {
Teacher Teacher {get;set;} // many-to-one key = Student.TeacherID
School School { get {return this.Teacher.School;} } // not mapped
}
是否可以创建NHibernate映射以允许此查询,
(不添加冗余的 session
.CreateCriteria<Student>()
.Add(Expression.Eq("School",mySchool);
列)?