- 修复 聚合根仓储 InsertOrUpdate OneToMany 只插入一条记录的 bug;

This commit is contained in:
2881099
2024-02-27 19:35:48 +08:00
parent b18f9a5264
commit c5b1488831
8 changed files with 779 additions and 308 deletions

View File

@ -53,7 +53,7 @@ namespace FreeSql
bool LocalCanInsert(Type entityType, object entity, bool isadd)
{
var stateKey = rootRepository.Orm.GetEntityKeyString(entityType, entity, false);
if (stateKey == null) return true;
if (string.IsNullOrEmpty(stateKey)) return true;
if (ignores.TryGetValue(entityType, out var stateKeys) == false)
{
if (isadd)