Skip to content
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

NHibernate 5.3+ no longers supports Automapper ::ProjectTo in all scenarios #2644

Closed
pasqualedante opened this issue Jan 3, 2021 · 1 comment

Comments

@pasqualedante
Copy link

I have migrated my projects from NHibernate 5.2.6 to NHibernate 5.3.5 and from Automapper 9.0.0 to Automapper 10.1.1 and now (Automapper) ProjectTo not returns the same records of NHibernate query. In particular, this happens when the DTO in use uses the same naming conventions (of automapper) that I have always used: for example the CustomerId property of the DTO is resolved with the value of nested object Customer.Id. The same line of code works fine with Automapper 10.1.1 and NH 5.2.7, but don't works with Automapper 10.1.1 and NHibernate 5.3+.

I am attaching an unit test to show the issue in action.
Automapper.zip

I have read the various release notes from version 5.3.0 onwards and have not found any related breacking change mentioned: did I miss something?
Before, I have also open an issue on Automapper project but, after that I have viewed the Automapper execution-plan, I see that nothing is changed from AutoMapper 9.0.0 and Automapper 10.1.1.
It is this issue related to ticket #2334?

Thanks in advance.

@pasqualedante
Copy link
Author

Sorry, this ticket is Invalid: in some condition, I can reproduce also without NH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants