Closed cpistiner closed 5 years ago
IMHO exception message is pretty clear. What exactly is not clear to you?
You have both attribute column
and sub-element <column>
in your mapping for Numero
property. So:
Please use only sub-elements, or only one of them as attribute.
Hi bahusoid,
Yes, I understand that. But in 5.1.3 this isn't a problem.
The sub-element was to optimize queries, at least that was understood.
Removing this sub-element would bring me performance problems?
Thanks for your time.
Having both was always invalid, only one of them was taken into account. This is explained in release notes.
So anyway, in your mappings, in NH 5.1.3, either the attributes or the elements were ignored. (That was depending on the parent element, it was not even behaving consistently.)
Keep the ones you really need. Test if it works, just in case you were in the situation were the removed ones were the ones taken into account in NH v5.1 in that invalid situation.
See the release notes for more details, or the PR, #1808.
Having both was always invalid, only one of them was taken into account. This is explained in release notes.
So anyway, in your mappings, in NH 5.1.3, either the attributes or the elements were ignored. (That was depending on the parent element, it was not even normalized.)
Keep the ones you really need. Test if it works, just in case you were in the situation were the removed ones were the ones taken into account in NH v5.1 in that invalid situation.
See the release notes for more details, or the PR, #1808.
Very complete, thank you!
Hi all,
Recently I upgrade to 5.2.3 from 5.1.3 and I'm having the following error message: NHibernate.MappingException: Could not compile the mapping document: Infraestructura.Repositories.Mappings.Comprobante.hbm.xml ---> NHibernate.MappingException: On Numero property: specifying columns or formulas with both attributes and sub-elements is invalid. Please use only sub-elements, or only one of them as attribute.
This error refer to this mapping:
And this property from class Chofer:
How would the correct mapping be in this version?
Regards, César