Refactor custom SQL code to reduce code duplication and improve maintainability
Description
The custom/native SQL query code in the NHibernate.Loader.Custom namespace contains a number of very large methods with a lot of code duplication. These methods tend to deal with the transformating of custom query results (returns) and are hard to maintain.
In the process of improving the feedback on XML mapping errors for native SQL queries, I have already refactored quite a few classes in the NHibernate.Loader.Custom namespace. For which a pull request is available at https://github.com/nhibernate/nhibernate-core/pull/161.
Environment
None
Activity
Show:
Oskar Berggren
September 28, 2014 at 5:51 PM
Some of the small cleanups from PR 161 merged. For the larger refactorings, I fear that we might divert too much from Hibernate.
The custom/native SQL query code in the NHibernate.Loader.Custom namespace contains a number of very large methods with a lot of code duplication. These methods tend to deal with the transformating of custom query results (returns) and are hard to maintain.
In the process of improving the feedback on XML mapping errors for native SQL queries, I have already refactored quite a few classes in the NHibernate.Loader.Custom namespace. For which a pull request is available at https://github.com/nhibernate/nhibernate-core/pull/161.