Skip to content

Fix properties mapped inside a <properties> group are empty when retrieving object #2142

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 4 commits into from
Apr 30, 2019

Conversation

lillo42
Copy link
Contributor

@lillo42 lillo42 commented Apr 24, 2019

Fixes #1006

//useParent = parent != null && base.ReturnedClass.IsInstanceOfType(parent);
var useParent =
parent != null &&
//TODO: Yuck! This is not quite good enough, it's a quick
Copy link
Member

Choose a reason for hiding this comment

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

@@ -19,9 +19,12 @@ public override bool IsEmbedded

public override object Instantiate(object parent, ISessionImplementor session)
{
bool useParent= false;
// NH Different implementation : since we are not sure about why H3.2 use the "parent"
Copy link
Member

Choose a reason for hiding this comment

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

So, now we're sure why this code was written like this...

@hazzik

This comment has been minimized.

@hazzik hazzik changed the title Fixes NH-2714 - Code Issues 569 Pull requests 50 Insights NH-2714 - Properties mapped inside a <properties> group are not set when retrieving object Fix properties mapped inside a <properties> group are not set when retrieving object Apr 29, 2019
@hazzik hazzik added the t: Fix label Apr 29, 2019
@hazzik hazzik added this to the 5.3 milestone Apr 29, 2019
hazzik
hazzik previously approved these changes Apr 29, 2019
@hazzik hazzik changed the title Fix properties mapped inside a <properties> group are not set when retrieving object Fix properties mapped inside a <properties> group are empty when retrieving object Apr 30, 2019
@hazzik hazzik merged commit 21975f6 into nhibernate:master Apr 30, 2019
@hazzik
Copy link
Member

hazzik commented Apr 30, 2019

Thanks @lillo42

@lillo42 lillo42 deleted the nh-2714 branch April 30, 2019 06:20
@deAtog
Copy link
Contributor

deAtog commented Jun 17, 2019

I just spent a day debugging this issue on 4.0.4.GA only to find that this bug was reported over 8 years ago and was the result of changes made to NHibernate while porting code from Hibernate. Bug fixes like these ought to be back-ported/committed to earlier versions when possible, especially when the H3.2 code on which this fix is based was written 12 years ago.

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.

NH-2714 - Properties mapped inside a <properties> group are not set when retrieving object
3 participants