Application use NHibernate. I Have object A that contains set of objects B. I have cascade="all-delete-orphan" in my config file. When I do changes in A object, then save, object B is also saving. How to prevent saving B ? Is it possible to disable cascade for a moment ? regards Marcin
0
votes
2 Answers
1
votes
You may consider using IStatlessSession
Operations performed using a stateless session do not ever cascade to associated instances. Collections are ignored by a stateless session. Operations performed via a stateless session bypass Hibernate's event model and interceptors. Stateless sessions are vulnerable to data aliasing effects, due to the lack of a first-level cache. A stateless session is a lower-level abstraction, much closer to the underlying ADO.