NHibernate延迟加载属性-构建时字节码检测是什么意思? [英] NHibernate lazy loading property - what does build-time bytecode instrumentation mean?
本文介绍了NHibernate延迟加载属性-构建时字节码检测是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试在域模型中延迟加载属性,但是延迟加载不起作用. (始终加载).
I've tried to lazy-load a property in my domain model, but lazy loading doesn't work. (It is always loaded).
[Property(0, Column = "picture", Lazy=true)]
public virtual System.Byte[] Picture
{
get { return picture; }
set { picture = value; }
}
阅读文档此处表示需要构建时字节码检测.这是什么意思-我怎么得到它?
When reading the documentation here it says that it requires build-time bytecode instrumentation. What does this mean - and how can I get it ?
推荐答案
我尝试过集合而不是数组吗?
I have you tried a collection rather then an array?
[Property(0, Column = "picture", Lazy=true)]
public virtual IList<System.Byte> Picture
{
get { return picture; }
set { picture = value; }
}
这篇关于NHibernate延迟加载属性-构建时字节码检测是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文