griffon-plugins / griffon-mybatis-plugin

Griffon MyBatis Plugin
http://griffon-framework.org/
Apache License 2.0
1 stars 1 forks source link

Mybatis mapper interface does not allow List selection with parameters #3

Closed swalton00 closed 4 years ago

swalton00 commented 4 years ago

If the interface method is defined as: List getViewList() it works as desired. If the interface method is defined as: List getViewList(int viewSelection) the compiler doesn't find any matching methods. This is needed to select a sub-set view. A work-around is to define a totally different selection with it's own WHERE clause (using MyBatis includes makes this work). But this does not work if specific information is needed (such as a selection date)

aalmiray commented 4 years ago

I'm afraid I don't follow. Is this related to a method that returns a collection type? As shown in the tests there's a finder method that takes a parameter

https://github.com/griffon-plugins/griffon-mybatis-plugin/blob/master/subprojects/griffon-mybatis-core/src/test/resources/griffon/plugins/mybatis/mappers/PersonMapper.xml

https://github.com/griffon-plugins/griffon-mybatis-plugin/blob/master/subprojects/griffon-mybatis-core/src/test/groovy/griffon/plugins/mybatis/mappers/PersonMapper.groovy

swalton00 commented 4 years ago

This is me not remembering everything that I should. I remberedd to define the method in the Interface and then referenced a method. What I didn't remember to do was to define the method in the service. Once I rembered to define each piece where it needed to be, it works fine. I will close this as not a bug.

swalton00 commented 4 years ago

Not a bug - just incomplete thinking on my part.