- 修复 DB First 延迟加载 ManyToOne 返回总是NULL #1451

This commit is contained in:
2881099
2023-03-09 17:02:37 +08:00
parent 4fc20086c1
commit ecd0eb622c
3 changed files with 6054 additions and 6055 deletions

File diff suppressed because it is too large Load Diff

View File

@ -666,7 +666,7 @@ namespace FreeSql.Internal
{ //set 重写
cscode.Append(" ").Append(propSetModification).Append(" set {\r\n")
.Append(" base.").Append(pnv.Name).AppendLine(" = value;")
.Append(" __lazy__").Append(pnv.Name).AppendLine(" = true;")
.Append(" if (value != null) __lazy__").Append(pnv.Name).AppendLine(" = true;")
.Append(" }\r\n");
}
cscode.AppendLine(" }");
@ -696,7 +696,7 @@ namespace FreeSql.Internal
{ //set 重写
cscode.Append(" ").Append(propSetModification).Append(" set {\r\n")
.Append(" base.").Append(pnv.Name).AppendLine(" = value;")
.Append(" __lazy__").Append(pnv.Name).AppendLine(" = true;")
.Append(" if (value != null) __lazy__").Append(pnv.Name).AppendLine(" = true;")
.Append(" }\r\n");
}
cscode.AppendLine(" }");
@ -1166,7 +1166,7 @@ namespace FreeSql.Internal
{ //set 重写
cscode.Append(" ").Append(propSetModification).Append(" set {\r\n")
.Append(" base.").Append(pnv.Name).AppendLine(" = value;")
.Append(" __lazy__").Append(pnv.Name).AppendLine(" = true;")
.Append(" if (value != null) __lazy__").Append(pnv.Name).AppendLine(" = true;")
.Append(" }\r\n");
}
cscode.AppendLine(" }");