mybatis逆向工程带条件查询用PageHelper分页插件出错
问题:
There is no getter for property named '__frch_criterion_1' in 'class com.××.××.TbContentExample'。可是我并没有定义这个变量。
代码如下:
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
//执行查询 TbContentExample example = new TbContentExample(); Criteria criteria = example.createCriteria(); criteria.andCategoryIdEqualTo(((long)categoryId)); //分页处理 PageHelper.startPage(1, 10); List<TbContent> list = contentMapper.selectByExampleWithBLOBs(example);
分析:
把条件注释掉或者分页注释掉正常使用。个人猜测可能是分页插件和逆向工程不兼容。
解决:
其实是还没解决,最后自己写了mapper和xml查询。记录一下,md找了一下午原因
本文版权归作者本人所有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利.