什么是NHibernate的对象标识问题?
What is the meaning of Object Identity Problem in NHibernate?
对象身份的问题是,有没有完美的(也就是100%准确)的方式,以确保一个普通的CLR对象的对象的身份有一个1: 1映射到NHibernate的对象的身份。
The object identity problem is that there is no perfect (aka 100% exact) way to make sure that an object identity for a plain CLR object has a 1:1 mapping to an object identity in NHibernate.
的原因是,在一种情况下(CLR)由对象指针定义在其他情况下,通过一个数据库ID值对象标识该对象的身份,
The reason is that object identity in the one case (CLR) is defined by the object pointer, object identity in the other case by a database ID value.
因此,它可能是不可能的CLR对象完全可靠地映射到一个NHibernate的对象
So it might not be possible to fully reliably map a CLR object to a NHibernate object.
BTW:这是什么特别的NHibernate的,但并不都适用于任何对象 - 关系映射
BTW: That is nothing special to NHibernate but does hold true for any object-relational mapper.
上一篇:错误刷新iventory(查询项目的价格)。 (回应:6:错误)错误、项目、价格、iventory
下一篇:同时采用的ProGuard在ADT和放大器导出Android项目; SDK 20放大器、项目、ProGuard、ADT