Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support for customized ProviderSqlSource. #1226

Closed
wants to merge 1 commit into from

Conversation

abel533
Copy link
Contributor

@abel533 abel533 commented Mar 24, 2018

Enhances the functionality by customizing the ProviderSqlSource.

synchronized with latest code

see also #1120, #1111

@harawata
Copy link
Member

harawata commented Apr 4, 2018

Hi @abel533 ,

Thank you for the PRs and sorry for my lack of response.
You wrote...

This feature is very useful and it is easy for developers to create the underlying framework.

So, this is another attempt to auto-generate SQLs, I presume.
I've been thinking about this request for a while, but building a framework that generates XML string does not seem to be the right approach to me.
And even if this PR is merged, how do you plan to auto-generate result maps?

@abel533
Copy link
Contributor Author

abel533 commented Apr 5, 2018

The simplest way is to use column aliases, the other way is getting the MappedStatement of the current interface method through Configuration can also override the result map.

There is a common Mapper that is commonly used in China. This implementation is to modify the MappedStatement during initialization. Although this method works well, it is more complicated to understand. With this pr, it can be implemented in a more compact way and can be easily extended and understand.

If this PR can be merged, I will provide a framework for reference as soon as possible. It is more convenient to use this function than MBG(because it is dynamically generated at runtime).

@abel533
Copy link
Contributor Author

abel533 commented Nov 22, 2018

@harawata Please resolve this PR before the 3.5.0 release.

@harawata
Copy link
Member

Hi @abel533 ,
As I wrote, this does not seem to be the right approach to me.
I keep it open because other devs might have a different opinion.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants