-
Notifications
You must be signed in to change notification settings - Fork 935
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
Support mixed formulas and columns in By Code #1759
Support mixed formulas and columns in By Code #1759
Conversation
47f40d2
to
5d9ade2
Compare
src/NHibernate.Test/NHSpecificTest/GH1759/ColumnsAndFormulasFixture.cs
Outdated
Show resolved
Hide resolved
Fix a null reference exception in OneToManyPersister Spotted while testing nhibernate#1759
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
d01463e
to
5b0e2e7
Compare
This comment has been minimized.
This comment has been minimized.
Fix a null reference exception in OneToManyPersister Spotted while testing #1759
Can we come up with a better name other that "ColumnsAndFormulas"? Or some other method how to declare these? |
The way mapping by code is designed, I have no better idea. So for mapping many columns and formulas, a Introducing something like |
Since the mapping by code naming seems to block this issue, I think the hbm mapping fix should be merged separately. I will add a separated PR. |
This comment has been minimized.
This comment has been minimized.
d519eeb
to
6284cec
Compare
To be squashed
To be squashed
/// </summary> | ||
/// <param name="columnOrFormulaMapper">The mappers for each column or formula.</param> | ||
/// <remarks>Replaces any previously mapped column or formula.</remarks> | ||
void ColumnsAndFormulas(params Action<IColumnOrFormulaMapper>[] columnOrFormulaMapper); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still do not have a better name. In fact, I do not think there is a better name fitting the current API shape, which already does not follow usual guidelines for method names. (For example, they are not prefixed by an imperative verb.)
Many mapping elements allow to define their columns or formulas by nested elements, but most of them were not supporting having both nested columns and formulas.
Follow up to #1808, which has added this support for hbm mappings.
Fixes #1278 by the way.