Skip to content

Conversation

dadadadudu
Copy link

@dadadadudu dadadadudu commented Nov 8, 2024

如果只配置了DB_VENDOR标签,没有配置具体的properties,希望能根据DataSource默认的productName来使用对应的MapperStatement

@harawata
Copy link
Member

harawata commented Nov 8, 2024

Hello @dadadadudu ,

Thank you for the PR, but this is wrong.
If specified value does not match the product name, it should return null.
Please see the test case.

We don't understand Chinese. Please try using English.

@harawata harawata closed this Nov 8, 2024
@dadadadudu
Copy link
Author

Hello @dadadadudu ,

Thank you for the PR, but this is wrong. If specified value does not match the product name, it should return null. Please see the test case.

We don't understand Chinese. Please try using English.

image

If I use the following configuration, I believe the databaseId should be 'MySQL' instead of null, but currently it is null.

@dadadadudu
Copy link
Author

When no mapping configuration is provided in the databaseIdProvider, can the DatabaseProductName be directly used as the databaseId?

@harawata
Copy link
Member

harawata commented Nov 8, 2024

Never mind. I think I understand what you mean.
I'll look into it within a day or two (hopefully).

@harawata
Copy link
Member

harawata commented Nov 9, 2024

I have created a new issue #3296 and the fix #3297 has been merged.
You should be able to verify the fix with the latest 3.5.17-SNAPSHOT .
https://github.com/mybatis/mybatis-3/wiki/Maven#snapshot

Thank you for your contribution, @dadadadudu !

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

Successfully merging this pull request may close these issues.

3 participants