提问人:Inked 提问时间:10/3/2023 最后编辑:Inked 更新时间:10/3/2023 访问量:25
Mybatis - 嵌套的延迟加载结果属性在结果映射问题上已经存在
Mybatis - nested lazy loaded result property is already exist on result map issue
问:
我打算将弹簧从 4 升级到 5 因此,我需要将mybatis从2升级到3.5.11
在升级 mybatis 时,我遇到了这个问题,这对我来说是不清楚的。
我得到以下错误-
nested exception is org.apache ibatis:executor ExecutorException:
Nested lazy loaded result property "xyz” for “com.xyz.ApplicationMybatisDaogetbyName” already exists in the result map. The leftmost property of al lazy loaded properties must be unique within a result map.
但是我检查了我的 mybatisDao xml ,只有一次被提及:
同样的事情在旧版本的mybatis中也有效。
这个问题似乎发生在使用关联时,但不确定。
我将关联用作:
属性:xyz,列:列名 ,选择:com.xyz.ApplicationMybatisDaogetbyName
我尝试添加sql会话bean的属性 -
configuration.setLazyLoadingEnabled(false); configuration.setAggressiveLazyLoading(false); configuration.setReturnInstanceForEmptyRow(true);
但它没有奏效。
任何避免此问题的线索将不胜感激
答: 暂无答案
评论