Reputation: 6068
We have a database that is updated via a background process. We are using NHibernate to query the data for display on the web UI, so we don't need change tracking or lazy-loading.
If we mark all the mappings as mutable="false", is this the same as using a stateless session?
Upvotes: 2
Views: 1323
Reputation: 52753
No, it's not the same. In fact, it has absolutely nothing to do with it (i.e. you can modify entities in stateless sessions).
A StatelessSession does not keep track of entities, which results in big performance improvements (both in memory usage and execution times) when you don't need the features that a stateful session provides.
In particular:
Upvotes: 4