What is the meaning of Object Identity Problem in NHibernate?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.
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.
So it might not be possible to fully reliably map a CLR object to a NHibernate object.
BTW: That is nothing special to NHibernate but does hold true for any object-relational mapper.