Merge pull request #193 from font-C/main

Fixed:修复表关联的从表配置schema,查询从表时schema丢失问题
This commit is contained in:
Michael Yang 2023-10-25 19:31:17 +08:00 committed by GitHub
commit d464a62992
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,7 +88,7 @@ abstract class AbstractRelation<SelfEntity> {
//以使用者注解配置为主 //以使用者注解配置为主
this.targetTableInfo = StringUtil.isBlank(targetTable) ? TableInfoFactory.ofEntityClass(relationFieldWrapper.getMappingType()) : TableInfoFactory.ofTableName(targetTable); this.targetTableInfo = StringUtil.isBlank(targetTable) ? TableInfoFactory.ofEntityClass(relationFieldWrapper.getMappingType()) : TableInfoFactory.ofTableName(targetTable);
this.targetSchema = targetSchema; this.targetSchema = targetTableInfo != null ? targetTableInfo.getSchema() : targetSchema;
this.targetTable = targetTableInfo != null ? targetTableInfo.getTableName() : targetTable; this.targetTable = targetTableInfo != null ? targetTableInfo.getTableName() : targetTable;
//当指定了 valueField 的时候一般是 String Integer 等基本数据类型 //当指定了 valueField 的时候一般是 String Integer 等基本数据类型