We're updating the issue view to help you get more done. 

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

Status

Assignee

Roger

Reporter

RicoP