zoukankan      html  css  js  c++  java
  • MyBatis Criteria使用 OffsetLimitInterceptor.java分页报错

    Reported by hbm...@gmail.com, Oct 28, 2010
    MyBatis 3.0.2
    ?
    调用mapper的select方法,使用MyBatis Generator生成的Criteria作为参数传入,同时传入参数RowBounds控制分页,结果报错
    T
    There is no getter for property named '__frch_criterion_1' in 'class XXXX'
     
     
     
    ?
    跟踪OffsetLimitInterceptor过程中发现
    ?
    代码79行创建的newBoundSql相比较从MappedStatement中取得的boundSql丢失了additionalParameters
     
     
     
    ?
    之后在79行和80行之间加入代码
    f
    for (ParameterMapping mapping : boundSql.getParameterMappings()) {
     
                    String prop = mapping.getProperty();
     
                    if (boundSql.hasAdditionalParameter(prop)) {
     
                        newBoundSql.setAdditionalParameter(prop, boundSql.getAdditionalParameter(prop));
     
                    }
     
                }
    ?
    问题解决
     
     
    Oct 30, 2010
    Project Member #1 bad...@gmail.com遵照你所说的方法进行修正.
     
     
    Status: Fixed 
    Jul 9, 2013
    #2 louwei.0...@gmail.com这都2013年了,这个bug 还没修复呢。。。
     
     
    Jul 9, 2013
    #3 micro1...@gmail.com小问题自己修改一下就可以了
  • 相关阅读:
    hdu4639 hehe ——斐波纳契数列,找规律
    codefoces round193a
    codeforces 192e
    abbyy cup a
    年中总结
    codeforces 192a
    codeforces 192b
    codeforces 192 c
    codeforces 192 D
    codeforces magic five --快速幂模
  • 原文地址:https://www.cnblogs.com/huapox/p/3516098.html
Copyright © 2011-2022 走看看