Skip to content

Allow setting dynamic component templates from dictionary in ByCode #1941

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 1 commit into from
May 28, 2019

Conversation

fredericDelaporte
Copy link
Member

Fixes #913 - NH-3704

Replaces #341. It is a rebase of it, with fixes required due to changes in NHibernate.

The original PR repository being deleted, I do not see any way to work with it other than opening a new PR.

The original PR was put in the 6.0 milestone, but it does not have breaking changes. It can be put in the 5.3 milestone.

There was a discussion about the implementation relying on dynamically building a type matching the component. It allows to re-use the existing By-Code logic working on anonymous types, rather than coding a whole new code path for mapping dynamic components by code. It is a bit runtime heavy way of doing things, but it seems doing it another way will require a bit to much changes in By-Code.

If approved, it should be manually squashed before merging, in order to keep Ricardo as the main author.

@fredericDelaporte fredericDelaporte changed the title Allow setting dynamic component templates from dictionary in ByCode WIP Allow setting dynamic component templates from dictionary in ByCode Feb 28, 2019
@fredericDelaporte fredericDelaporte changed the title WIP Allow setting dynamic component templates from dictionary in ByCode WIP - Allow setting dynamic component templates from dictionary in ByCode Feb 28, 2019
@bahusoid

This comment has been minimized.

@bahusoid

This comment has been minimized.

@fredericDelaporte
Copy link
Member Author

Feel free to try your suggestions directly here if you wish. I have less time available currently for contributing, and I am not prioritizing this PR over other PRs. I will probably not look into the trouble raised by Alexander before next week-end.

@bahusoid
Copy link
Member

bahusoid commented Mar 6, 2019

Feel free to try your suggestions directly here if you wish

Ok I've checked the code and my suggestions are not really helpful. I don't know how to make this delegate work without huge refactoring

@hazzik hazzik modified the milestones: 5.3, 6.0 Mar 11, 2019
@hazzik

This comment has been minimized.

#pragma warning restore 618
}

[Obsolete("Please use GetRequiredPropertyOrFieldByName instead.")]
public static MemberInfo GetPropertyOrFieldMatchingNameOrThrow(string memberName)
Copy link
Member

Choose a reason for hiding this comment

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

Having this method static really sucks.

bahusoid
bahusoid previously approved these changes Mar 25, 2019
@hazzik hazzik changed the title WIP - Allow setting dynamic component templates from dictionary in ByCode Allow setting dynamic component templates from dictionary in ByCode Mar 29, 2019
@hazzik hazzik force-pushed the rjperes-ByCodeDynComp branch 2 times, most recently from 4e02aa9 to 492c29a Compare March 29, 2019 10:19
hazzik
hazzik previously approved these changes Mar 29, 2019
@hazzik hazzik modified the milestones: 6.0, 5.3 Apr 24, 2019
Fixes nhibernate#913 - NH-3704

Co-authored-by: Alexander Zaytsev <hazzik@gmail.com>
Co-authored-by: Frédéric Delaporte <12201973+fredericdelaporte@users.noreply.github.com>
@fredericDelaporte
Copy link
Member Author

Rebased and squashed, for allowing merging while keeping its original author.

@hazzik hazzik merged commit f13368c into nhibernate:master May 28, 2019
@fredericDelaporte fredericDelaporte deleted the rjperes-ByCodeDynComp branch June 1, 2019 11:46
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-3704 - Allow Setting Dynamic Component Templates From Dictionary
4 participants