I'm close to commiting a port of read-only entity support for the upcoming 
release of NHibernate. As this clearly falls into the category of 
Improvement, I would like to propose the next release is called 3.1.

The port has two goals:

1. Enhanced API.
a) Read-only status can be configured at runtime (not only in the mapping). 
b) Read-only status can be set per-Session, per-Criteria, or per-entity. 
NHibernate currently only supports per-IQuery. 

2. Improved performance.
a) Dirty tracking is not performed on read-only entities, resulting in 
faster flush/auto-flush.
b) Without the need to maintain entity snapshots for read-only entities, 
memory usage is reduced

Resources:

a) Hibernate documentation: 
http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html/readonly.html
b) JIRA issue: http://216.121.112.228/browse/NH-908
c) Code: ReadOnlyEntities feature branch in the NH SVN repository

Please let me know if you have objections to a 3.1 - rather than 3.0.1 - 
release.

Julian

Reply via email to