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