Is it possible to overload Session.Delete() behavior to not to perform real deleting from DB but update value of int State column to special deleted value? And would be great to restrict then loading of deleted entities by GetAll() method.
Is it possible to overload Session.Delete() behavior to not to perform real deleting from
Share
This kind of a Delete is called Soft Delete. You can use interceptor to override
Session.Delete()and usewhereon class mapping to define a formula, like:Gabriel Schenker has an example on nhforge.org: http://nhibernate.info/blog/2008/09/06/soft-deletes.html