mybatis逆向工程带条件查询用PageHelper分页插件出错


问题:

There is no getter for property named '__frch_criterion_1' in 'class com.××.××.TbContentExample'。可是我并没有定义这个变量。

代码如下:

//执行查询
TbContentExample example = new TbContentExample();
Criteria criteria = example.createCriteria();
criteria.andCategoryIdEqualTo(((long)categoryId));
        
//分页处理
PageHelper.startPage(1, 10);
List<TbContent> list = contentMapper.selectByExampleWithBLOBs(example);
View Code

分析:

把条件注释掉或者分页注释掉正常使用。个人猜测可能是分页插件和逆向工程不兼容。

解决:

其实是还没解决,最后自己写了mapper和xml查询。记录一下,md找了一下午原因


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM