Nhibernate interception request

I am looking at the nhibernate interceptor. It seems to be able to intercept save, update, and delete requests, but am I there anyway to intercept the selected request.

The problem is that I automatically want to add some additional sql filters to the executable sql statement in certain cases.

Any thoughts

Thanks Mat

+3
source share
3 answers

The interceptor structure allows you to intercept operations with objects, such as saving, updating, and deleting. Requests themselves are not intercepted, only operations with entities (and selection / view are not taken into account).

, ICriteria .

+2

, NHibernate persister; , , ...

0

You can use the attribute wherein the tag class:

<class name="MyClass" where="deleted=0">
    ...
</class>
0
source

Source: https://habr.com/ru/post/1745457/


All Articles