Skip to content
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

Handle <bind> correctly inside <foreach> #2760

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Dec 17, 2022

  1. Added a test case for mybatis#2754

    Also related to mybatis#206 mybatis#575
    harawata committed Dec 17, 2022
    Configuration menu
    Copy the full SHA
    17a9930 View commit details
    Browse the repository at this point in the history
  2. When processing DynamicSqlSource, evaluate param values in scripting …

    …phase
    
    - Evaluated param values are stored in `ParameterMapping` and later used in DefaultParameterHandler
    - There is no change when processing RawSqlSource
    - Removed unused `injectionFilter` from TextSqlNode (mybatisgh-117)
    
    This should fix mybatis#2754 .
    
    This might also fix mybatis#206 and mybatis#575 , but with this patch, it still is not possible to invoke a method with parameter inside a parameter reference like `#{_parameter.mymethod(_parameter.value)}`.
    It might be possible to accept OGNL expression in a param reference (e.g. `#{${_parameter.mymethod(_parameter.value)}}`), but I'm not sure if that's a good idea.
    harawata committed Dec 17, 2022
    Configuration menu
    Copy the full SHA
    584990a View commit details
    Browse the repository at this point in the history
  3. Stop rewriting item/index variables inside foreach

    Although it is not the goal, this could improve performance when there are many foreach iterations.
    harawata committed Dec 17, 2022
    Configuration menu
    Copy the full SHA
    e7f7622 View commit details
    Browse the repository at this point in the history