-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect audit table insert on tables with tree structure #18
Comments
Can you please create a pull request with a failing test following the structure of tests in https://github.com/nhibernate/nhibernate-envers/tree/master/Src/NHibernate.Envers.Tests/NetSpecific/Integration Thanks. |
…tree structure
…tree structure
Hello, any chance for a fix of this issue ? Or could you be so kind and point me some workaround ? |
A "workaround" would be to set real TreeEntity instance as parent instead of creating a new one and set its Id to the original one. |
Closing this one, leave corresponding PR #19 open. |
Hello.
I have a problem with envers when an audited table has a tree structure.
When I insert a row without any parent it inserts correctly to an audit table with revision type 0 (Added).
Then I try to insert a child row with an ID pointing to parent row (by creating an empty entity with only ID set, it works normallny with nHibernate).
The result is that Envers tries to insert an audit table row with with revision type 1 (Modified) that corresponds to the parent row with all the fields set to null...
It's very strange, but when I comment out the HasMany mapping it works ok.
I have made a sample project to show that behavior, it crashes because one of the fields is set to be not null.
EnversTest.zip
The text was updated successfully, but these errors were encountered: