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

Activity

Show:
RicoP
October 21, 2017, 8:09 AM
Edited

Locally I created a branch with test, showing the problem. Unfortunately I cannot push the branch to the repository:

hg push --new-branch default
pushing to https://wk_core@bitbucket.org/RogerKratz/nhibernate.envers
searching for changes
abort: authorization failed

The authentication dialog of SourceTree it says that I entered the right credentials. Do I need special rights from your side? Sorry, I never used BitBucket before.

Frédéric Delaporte
October 21, 2017, 11:01 AM

I would guess it is a like GitHub: you should not push directly to Envers repository, but to your own clone of the repository, then issue a PR from it toward Envers repository.

Roger
October 21, 2017, 7:31 PM

Yes, exactly. Thanks for pointing that out, Frederic.

RicoP
October 21, 2017, 7:41 PM

Thanks, finally I managed to create a pull request

RicoP
October 23, 2017, 8:34 AM
Edited

Thanks for fixing this bug so fast.

Assignee

Roger

Reporter

RicoP

Labels

None

Components

Fix versions

Affects versions

Priority

Blocker
Configure