Fluent NHibernate 中延迟加载公式列
我的类的属性之一映射到一个函数。我的映射如下所示:
mapping.Map(x => x.FormulaField, "FormulaField") .Formula("FUNCTION_NAME") .LazyLoad();
注意:映射是 AutoMapping 的一个实例,
当我检查生成的 SQL 时,选择了“FormulaField”列。我缺少什么?
One of the property of my class is mapped to a function. My mapping looks like this:
mapping.Map(x => x.FormulaField, "FormulaField")
.Formula("FUNCTION_NAME")
.LazyLoad();
NOTE: mapping is an instance of AutoMapping
When I checked the SQL generated the "FormulaField" column is being selected. What am I missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您使用的是哪个版本的 NHibernate?我认为惰性属性仅在 NHibernate 3.0 中可用(仍处于测试阶段),而且我什至不确定 Fluent NHibernate 是否完全支持 NH3 惰性属性 - 因为目前还没有 Fluent NHibernate 的 NH3 版本。
有关惰性属性的更多信息: http: //ayende.com/Blog/archive/2010/01/27/nhibernate-new-feature-lazy-properties.aspx
Which version of NHibernate are you using? I think lazy-properties are only available in NHibernate 3.0 (which is still in beta), and I'm not even sure whether Fluent NHibernate fully-supports NH3 lazy-properties - as there has been no NH3 build of Fluent NHibernate yet.
More info on lazy-properties: http://ayende.com/Blog/archive/2010/01/27/nhibernate-new-feature-lazy-properties.aspx