Skip to content

Test case and fix to NH-3898 #500

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 6 commits into from
Nov 17, 2017

Conversation

hailtondecastro
Copy link
Contributor

@hailtondecastro hailtondecastro commented Aug 12, 2016

Test case and fix to NH-3898
Configuring a property with generated="insert" it makes
"Property.IsUpdatable" "false" even using update="true" in the xml
mapping file.
Please consider keep this issue as Critical, as it does not break the
application, it makes the applications migrated from NHibernate version
2 to 3 or 4 generates inconsistent data within the database.

@hazzik hazzik changed the base branch from 4.0.x to master March 7, 2017 10:47
@hazzik hazzik changed the base branch from master to 4.0.x March 7, 2017 10:47
@fredericDelaporte
Copy link
Member

If this patch get merged, it would be probably more likely to happen on master or 4.1 branch. If you port your PR on master, now it requires VS2017 (Community edition is enough).

The change looks legit, but you need to follow contributing guidelines. Notably, use tabs instead of spacing.

hazzik
hazzik previously approved these changes Nov 14, 2017
@hazzik hazzik added this to the 5.1 milestone Nov 14, 2017
hailtondecastro and others added 4 commits November 16, 2017 14:28
(https://nhibernate.jira.com/browse/NH-3898)
Configuring a property with generated="insert" it makes
"Property.IsUpdatable" "false" even using update="true" in the xml
mapping file.
Please consider keep this issue as Critical, as it does not break the
application, it makes the applications migrated from NHibernate version
2 to 3 or 4 generates inconsistent data within the database.
As soon as I can, I will send a pull request
…the property is not yet set to the actual inserted value db side.
@fredericDelaporte
Copy link
Member

Re-based for fixing the release build, small additional fix added to test.

@fredericDelaporte fredericDelaporte self-requested a review November 16, 2017 13:30
Copy link
Member

@hazzik hazzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to regenerate async

Assert.That(employee.PromotionCount, Is.EqualTo(0));
employee.Name = "Employee 1 changed";
employee.PromotionCount++;
Assert.That(employee.PromotionCount, Is.EqualTo(1));
Copy link
Member

@hazzik hazzik Nov 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That assert does not make sense anymore.

@hazzik hazzik merged commit 9a6b6bc into nhibernate:master Nov 17, 2017
@hazzik
Copy link
Member

hazzik commented Nov 17, 2017

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants