Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Entity history mechanics for NHibernate #6713

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

Merged
merged 28 commits into from
Jun 14, 2024

Conversation

Scythale
Copy link
Contributor

I'm sharing my own implementation of entity history mechanics for the NHibernate ORM.
The implementation is based on NHibernate event listeners.
Aslo I've made a few changes to the entity mappings.

@ismcagdas
Copy link
Member

@Scythale thanks a lot for your contribution 👍 Let me know when it is ready for review.

@Scythale Scythale marked this pull request as ready for review May 29, 2023 07:50
@ismcagdas
Copy link
Member

@Scythale Is this completed ?

@Scythale
Copy link
Contributor Author

yes

@Scythale Scythale closed this Aug 28, 2023
@ismcagdas ismcagdas reopened this Aug 28, 2023
@ismcagdas ismcagdas added this to the v9.0 milestone Aug 28, 2023
@ismcagdas
Copy link
Member

ismcagdas commented Nov 15, 2023

@Scythale thanks again for your contribution. I have tested the PR and I think there is a problem. IEntityHistoryHelper is transient and used in both InsertEventListener to add changes to static EntityChangeSets list and used in FlushEventListener to save those changes. But, since IEntityHistoryHelper is transient InsertEventListener and FlushEventListener gets different instances. Becasue of this, no change is saved. Do you think my assumption is correct or does this work correctly ?

@ismcagdas ismcagdas modified the milestones: v9.0, v9.1 Nov 15, 2023
@ismcagdas ismcagdas removed this from the v9.1 milestone Feb 1, 2024
@ismcagdas ismcagdas added this to the v9.2 milestone Feb 1, 2024
@Scythale
Copy link
Contributor Author

Scythale commented Feb 6, 2024

@ismcagdas sorry for the lack of response. I have no time to investigate issue you found. Only thing I can say is that entity history has been working fine in production environment for a few months now.

@ismcagdas ismcagdas modified the milestones: v9.2, v9.3 Apr 24, 2024
@ismcagdas
Copy link
Member

@Scythale thank you for your contribution, I have managed to write unit tests for most of the cases similar to EF Core. Your implementation was correct and all Nhibernate entity history unit tests are passing now. Thanks again 🙏

@ismcagdas ismcagdas merged commit 6ece4aa into aspnetboilerplate:dev Jun 14, 2024
2 checks passed
@Scythale Scythale deleted the NH-entity-history branch June 14, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants