O'Reilly logo

NHibernate 3 Beginner's Guide by Gabriel N. Schenker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Phantom updates

Sometimes NHibernate thinks an entity that we loaded from the database and did not explicitly change is dirty. How can this happen? Most of the time it is due to the fact that our mapping between the entities and database tables are wrong or incomplete.

Although we think we did not change the entities, NHibernate will send update statements to the database the moment the session is flushed. This behavior is unnecessary at best, but can lead to false positives if we, for example, monitor each data change to comply with audit requirements.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required