can not find lambda cache for this property [xxx] of entity

can not find lambda cache for this property [xxx] of entity

当我们在使用 "mybatisPlus"插件中的"LambdaQueryWrapper"查询的时候,遇到了这个问题;

意思是在我们的使用lambda时当前类中没有找到该字段信息。

异常信息如下

image-20250818154423253

找到当前类发现 有个注解 "@TableField(exist = false)" 表示非数据库字段信息

image-20250818155013919

把该注解删除掉就可以使用了

使用建议

当只查询或当前表中的字段作为查询条件时候可以用 "LambdaQueryWrapper" ,设计到取多个表字段 作为查询条件时候 用"QueryWrapper"

posted @ 2025-08-18 16:01  lanwf  阅读(135)  评论(0)    收藏  举报