nhibernate / nhibernate-core

NHibernate Object Relational Mapper
https://nhibernate.info
GNU Lesser General Public License v2.1
2.11k stars 923 forks source link

NH-3490 - EntityName doesn't work like supposed to when mapping by code #1157

Open nhibernate-bot opened 6 years ago

nhibernate-bot commented 6 years ago

Fredy Treboux created an issue:

When mapping by code (conformist in my case) and using the EntityName("someString") mapping, the different ClassMappings seem to get merged under the same mapping anyways, denying thus the functionality of entity-name and causing queries with entity-name to crash.

Hope I'm interpreting this correctly as a bug! Will attach a test case shortly.


Fredy Treboux added a comment — : This is a test showing the described problem with entity-name in two different ways. Please let me know if there's any problem with the test as this is my first submission.


Alexander Zaytsev added a comment — : I can confirm that this is a bug, I was trying to implement the NH-2218, but mapping by code did not work

hazzik commented 5 years ago

2095 has mapping example.