使用mybatisplus 时使用Lambda 表达式做查询条件会遇到mybatis拿不到缓存问题:
错误1:com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: can not find lambda cache for this entity
错误2:can not find lambda cache for this property [XXX] of entity [com.XXX.XXX]
解决方法:
在LambdaQueryWrapper条件之前添加以下语句
TableInfoHelper.initTableInfo(new MapperBuilderAssistant(new MybatisConfiguration(), “”), 条件类名.class)
标签:...,XXX,cache,报错,Mybatis,find,lambda
From: https://www.cnblogs.com/forever0406/p/17665505.html