Nhibernate和Spring中的惰性属性加载 [英] Lazy property loading in Nhibernate and Spring
问题描述
我正在使用NHibernate 2.1.2和Spring 1.3
I'm using NHibernate 2.1.2 and Spring 1.3
我的一个班上有两个Text列(blob).我正在尝试使用lazy ="true"映射这些属性,但是NHProfiler仍显示在加载主对象时将两列添加到SELECT语句中.
I have two Text columns (blobs) in one of my classes. I'm trying to use lazy="true" for the mapping of those properties but NHProfiler still shows the two columns being added to the SELECT statement when the main object is loaded.
我正在使用Spring.NHibernate会话工厂,并且已经配置了Castle和Spring并没有运气的ProxyFactory.
I'm using Spring.NHibernate session factory and have configured ProxyFactory with both Castle and Spring with no luck.
推荐答案
到目前为止,我知道版本2.1.2中未包含该内容
So far I know that's something NOT included on the version 2.1.2
根据该网址,懒惰属性是一个相当新的东西,它已经准备好在下一个版本中发布
According this url, lazy properties is something quite new and it's already on the trunk ready to be released on next version
http://ayende .com/Blog/archive/2010/01/27/nhibernate-new-feature-lazy-properties.aspx
您可以下载当前的中继代码或等待3.0版本:-)
You can download the current trunk code or wait to 3.0 version :-)
https://nhibernate.jira.com/secure /ReleaseNote.jspa?projectId=10000&version=10293
这篇关于Nhibernate和Spring中的惰性属性加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!