Issue 63 in rapid-framework: MyBatis Criteria使用 OffsetLimitInterceptor.java分页报错

123 views
Skip to first unread message

rapid-f...@googlecode.com

unread,
Oct 28, 2010, 11:04:30 PM10/28/10
to rapid-f...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 63 by hbmayi: MyBatis Criteria使用 OffsetLimitInterceptor.java分页
报错
http://code.google.com/p/rapid-framework/issues/detail?id=63

MyBatis 3.0.2
调用mapper的select方法,使用MyBatis Generator生成的Criteria作为参数传入,同
时传入参数RowBounds控制分页,结果报错
There is no getter for property named '__frch_criterion_1' in 'class XXXX'

跟踪OffsetLimitInterceptor过程中发现
代码79行创建的newBoundSql相比较从MappedStatement中取得的boundSql丢失了
additionalParameters

之后在79行和80行之间加入代码
for (ParameterMapping mapping : boundSql.getParameterMappings()) {
String prop = mapping.getProperty();
if (boundSql.hasAdditionalParameter(prop)) {
newBoundSql.setAdditionalParameter(prop,
boundSql.getAdditionalParameter(prop));
}
}
问题解决

rapid-f...@googlecode.com

unread,
Oct 30, 2010, 4:07:23 AM10/30/10
to rapid-f...@googlegroups.com
Updates:
Status: Fixed

Comment #1 on issue 63 by badqiu: MyBatis Criteria使用
OffsetLimitInterceptor.java分页报错
http://code.google.com/p/rapid-framework/issues/detail?id=63

遵照你所说的方法进行修正.

rapid-f...@googlecode.com

unread,
Jul 9, 2013, 4:06:07 AM7/9/13
to rapid-f...@googlegroups.com

Comment #2 on issue 63 by louwei.0...@gmail.com: MyBatis Criteria使用
OffsetLimitInterceptor.java分页报错
http://code.google.com/p/rapid-framework/issues/detail?id=63

这都2013年了,这个bug 还没修复呢。。。

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

rapid-f...@googlecode.com

unread,
Jul 9, 2013, 4:54:30 AM7/9/13
to rapid-f...@googlegroups.com

Comment #3 on issue 63 by micro1...@gmail.com: MyBatis Criteria使用
OffsetLimitInterceptor.java分页报错
http://code.google.com/p/rapid-framework/issues/detail?id=63

小问题自己修改一下就可以了
Reply all
Reply to author
Forward
0 new messages