Skip to content
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

Document IsDirty potential side effects #1449

Closed
fredericDelaporte opened this issue Nov 21, 2017 · 2 comments
Closed

Document IsDirty potential side effects #1449

fredericDelaporte opened this issue Nov 21, 2017 · 2 comments

Comments

@fredericDelaporte
Copy link
Member

As described in #1413, ISession.IsDirty default implementation can have side effects with serious consequences. They should be documented.

  • It will trigger pending SaveOrUpdate cascades.
  • The triggered Save will generates the ids of the saved entities. Depending on the id generator, this may cause calls to the database, or even the direct insertion of the entities when using the identity generator.
@hazzik
Copy link
Member

hazzik commented Nov 21, 2017

@fredericDelaporte I think that we do not need to create an issue together with a PR, eg, if you know that you'll submit a PR shortly after the issue is created.

@fredericDelaporte
Copy link
Member Author

Yes, a bit "old Jira" reflex, I thought about it afterward.

fredericDelaporte added a commit that referenced this issue Nov 21, 2017
joesun99 pushed a commit to joesun99/nhibernate-core that referenced this issue Nov 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants