Skip to content

Auto-mapping fails in a result map referenced from a constructor arg with columnPrefix #1496

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

Closed
hiirage opened this issue Mar 7, 2019 · 0 comments
Assignees
Labels
Milestone

Comments

@hiirage
Copy link

hiirage commented Mar 7, 2019

MyBatis version

3.5.0

Database vendor and version

H2

Test case or example project

auto_mapping.zip

Steps to reproduce

Run FooMapperTest should find an object Foo with object Bar.

Expected result

Find a foo with a bar auto mapped by properties.

Actual result

Test failed because foo.getBar() returns null.

##Potential Cause
Incorrectly match lowercase columnPrefix with uppercase columnName in method DefaultResultSetHandler::createAutomaticMappings

@harawata harawata changed the title Auto mapping by properties returns null Auto-mapping fails in a result map referenced from a constructor arg with columnPrefix Mar 9, 2019
@harawata harawata self-assigned this Mar 9, 2019
@harawata harawata added the bug label Mar 9, 2019
@harawata harawata added this to the 3.5.1 milestone Mar 9, 2019
pulllock pushed a commit to pulllock/mybatis-3 that referenced this issue Oct 19, 2023
…ld be converted to uppercase. Otherwise, auto-mapping in the referenced result map does not find the matching column.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants