当前使用版本(必填,否则不予处理)
3.5.2
该问题是如何引起的?(确定最新版也有问题再提!!!)
mybatisplus能使用LambdaQueryWrapper类构建条件,使用非entity对象构建条件,在mapper文件的sql注入使用。
找不到实体信息,这是肯定的,因为我查询是多表关联通过sql查询的,想通过LambdaQueryWrapper构建(非Entity)条件,抛出错误:nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression 'ew.customSqlSegment'. Cause: org.apache.ibatis.ognl.OgnlException: customSqlSegment [com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: can not find lambda cache for this entity
如果Wrapper只支持Entity实体方式的查询,那如何多表关联查询?Wrapper的便捷构建条件的方式就不能用了?
还是Wrapper使用的泛型,都需要建立一个Mapper文件进行挂钩?但是这不是更为繁琐和不可控吗? 因为这种方式的mapper,只能支持查询,不能进行查询以外的操作啊。
重现步骤(如果有就写完整)
报错信息
nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression 'ew.customSqlSegment'. Cause: org.apache.ibatis.ognl.OgnlException: customSqlSegment [com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: can not find lambda cache for this entity
Comment From: miemieYaho
只支持entity,不支持多表
Comment From: xhc-code
只支持实体,不支持多表
mybatisplus对于多表关联查询的支持方式没有吗?因为mybatisplus的wrapper很方便,能独立使用wrapper进行构建条件吗?