Skip to content

Failing test case for nested select with @Param attributes #648

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

Merged
merged 1 commit into from
Apr 25, 2016

Conversation

lkb2k
Copy link
Contributor

@lkb2k lkb2k commented Apr 21, 2016

I have modified the existing complex column test suite to add a failing test case that uses an association to a mapped statement that uses @param annotations. Other than the query being defined in the java interface and using @param instead of being in the XML the test is the same as the existing scenarios.

@emacarron
Copy link
Member

emacarron commented Apr 21, 2016

Thanks for the detailed test.

This is indeed a bug. In 3.3.x the internal map, that holds the input parameters for a mapper, fails if a get is called for a non-existing value. This change was added to fail-fast in case that someone has used a wrong name in an XML file.

The problem is that when filling input parameters a get("firstName") is called just to see if the parameter exists and what is its type and use the proper typehandler for it. The value is not yet in the "strict" map and it fails.

We will fix this for 3.4.1.

@emacarron emacarron added this to the 3.4.1 milestone Apr 25, 2016
@emacarron emacarron added the bug label Apr 25, 2016
@emacarron emacarron removed this from the 3.4.1 milestone Apr 25, 2016
@emacarron emacarron removed their assignment Apr 25, 2016
@emacarron emacarron removed the bug label Apr 25, 2016
@emacarron emacarron merged commit e37d9fb into mybatis:master Apr 25, 2016
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.

5 participants