tags:

views:

248

answers:

1

If I create a DTo using projection and an import mapping, is the object by default then immutable for NHibernate or is it possible to define mutable=false in the import mapping?

A: 

You could write a test that gets the same DTO from NHibernate then checks to see if they are reference equal. If they are reference equal then I would assume NHibernate keeps them in the identity map. My guess is that they are not reference equal.

ReferenceEquals(dto1, dto2)
Sneal