Exception on commit when RevisionOnCollectionChange property is set
NHE-161
One-To-Many in Subclass of a Subclass of a BaseClass
NHE-68
Using Validator and Envers together
NHE-11
Method 'ISessionImplementorProxy.List_callback' does not have a method body
NHE-140
One-to-one using ValidityAuditStrategy does not support update of entities after deletion
NHE-134
When using ValidityAuditStrategy, when an entity has audited set of child values, the same value cannot be added/removed from set twice
NHE-32
Cannot associate proxy with two open sessions
NHE-19
More then one save in transaction with one-to-one relations throw exception.
NHE-166
Make compatible with .Net Core 2.0 and .Net Standard 2.0
NHE-165
NullPointerException with indexed Collections
NHE-164
LazyInitiatlizationExeception when deleting entity with global_with_modified_flag turned on
NHE-154
Left outer join support for traversed associations
NHE-153
Make it possible to put restrictions on traversed associations
NHE-151
ExcludeRelationalData in a bidirectional onetoone relationship
NHE-150
Integrate NHE Configuration with Mapping-By-Code
NHE-148
Error with access="none" mapping
NHE-145
collection of Component in an entity not returing upon Audit Query
NHE-142
Error when trying to audit Component Set
NHE-136
CLONE - Unable to cast object of type 'NHibernate.Mapping.Formula' to type 'NHibernate.Mapping.Column'.
NHE-135
Component with null properties not included in collections
NHE-133
Component with null properties not included in collections
NHE-132
RelationTargetAuditMode.NotAudited on a relation in base class throws
NHE-131
RelationTargetAuditMode.NotAudited throws if current revision does not exist
NHE-124
Lazy Loading of audited entites with revision type 'delete'
NHE-121
Collections of components only supporting single element changes
NHE-118
Unable to cast object of type 'NHibernate.Mapping.Formula' to type 'NHibernate.Mapping.Column'.
NHE-117
Bidirectional custom collection throws
NHE-114
Better support for custom collections
NHE-113
Optimistic concurrency(version) field comes twice in audited table
NHE-112
Detached ManyToMany + WithModifiedFlag throws
NHE-105
IdBag + WithModifiedFlag throws when inserting
NHE-104
Introducing AuditFactoryAttribute
NHE-102
Add IPostInstantiationListener
NHE-101
Maximize in OR statement produce wrong result
NHE-99
Exception if non lazy ToOne ref exists
NHE-97
IdBag is not currently supported
NHE-96
unionsubclass mapping creates table for abstract base class
NHE-95
Rolled back transaction might create audit data
NHE-93
Incorrect entity revision when clearing the cache
NHE-90
Support custom generic types
NHE-88
Auditing a previously detached and now reatched object causes a null pointer exception
NHE-84
Make tests pass on mysql
NHE-80
Make tests pass on postgreesql
NHE-79
Make tests pass on Oracle
NHE-78
Data truncation may occur if you use IUserType with StringClobSqlType
NHE-74
The use of dynamic-component combined with using many-to-one reference causes an XML validation exception on initialization
NHE-73
The use of dynamic-component with multiple properties causes an exception on initialization.
NHE-71
Non audited collection throws if in a <join>
NHE-69
Support for custom PrimitiveType classes
NHE-66
Support saving an object with proxied envers collection
NHE-64
issue 1 of 165

Exception on commit when RevisionOnCollectionChange property is set

Description

I figured a different behaviour in Envers 5.0 compared to previous versions. It is related to the 2 settings 'RevisionOnCollectionChange' and 'GlobalWithModifiedFlag'. If both settings are set to true and the reference of one entity is changed, it ends up in an exception:

NHibernate.LazyInitializationException : Initializing[Envers5Bug.Person#1]-failed to lazily initialize a collection of role: Envers5Bug.Person.Cars, no session or session was closed

Since it is much harder to describe I prepared a very simple project which is revealing the problem. Please run Program.cs or Test.cs.

Environment

None

Assignee

Roger

Reporter

RicoP

Labels

None

Components

Fix versions

Affects versions

Priority

Blocker
Configure