- 修复 Firebird Inserted/Deleted 与 Repository 级联冲突 bug;#2023

This commit is contained in:
2881099
2025-05-06 17:44:05 +08:00
parent 84461f11ed
commit a3978d77ab
8 changed files with 119 additions and 17 deletions

View File

@@ -39,13 +39,13 @@ namespace FreeSql.Firebird.Curd
}
}
var sql = sb.Append(sbret).ToString();
var before = new Aop.CurdBeforeEventArgs(_table.TypeLazy ?? _table.Type, _table, Aop.CurdType.Delete, sql, dbParms);
var before = new Aop.CurdBeforeEventArgs(_table.Type, _table, Aop.CurdType.Delete, sql, dbParms);
_orm.Aop.CurdBeforeHandler?.Invoke(this, before);
Exception exception = null;
try
{
ret.AddRange(_orm.Ado.Query<T1>(_connection, _transaction, CommandType.Text, sql, _commandTimeout, dbParms));
ret.AddRange(_orm.Ado.Query<T1>(_table.TypeLazy ?? _table.Type, _connection, _transaction, CommandType.Text, sql, _commandTimeout, dbParms));
}
catch (Exception ex)
{
@@ -90,13 +90,13 @@ namespace FreeSql.Firebird.Curd
}
}
var sql = sb.Append(sbret).ToString();
var before = new Aop.CurdBeforeEventArgs(_table.TypeLazy ?? _table.Type, _table, Aop.CurdType.Delete, sql, dbParms);
var before = new Aop.CurdBeforeEventArgs(_table.Type, _table, Aop.CurdType.Delete, sql, dbParms);
_orm.Aop.CurdBeforeHandler?.Invoke(this, before);
Exception exception = null;
try
{
ret.AddRange(await _orm.Ado.QueryAsync<T1>(_connection, _transaction, CommandType.Text, sql, _commandTimeout, dbParms, cancellationToken));
ret.AddRange(await _orm.Ado.QueryAsync<T1>(_table.TypeLazy ?? _table.Type, _connection, _transaction, CommandType.Text, sql, _commandTimeout, dbParms, cancellationToken));
}
catch (Exception ex)
{

View File

@@ -107,7 +107,7 @@ namespace FreeSql.Firebird.Curd
Exception exception = null;
try
{
ret = _orm.Ado.Query<T1>(_connection, _transaction, CommandType.Text, sql, _commandTimeout, _params);
ret = _orm.Ado.Query<T1>(_table.TypeLazy ?? _table.Type, _connection, _transaction, CommandType.Text, sql, _commandTimeout, _params);
}
catch (Exception ex)
{
@@ -207,7 +207,7 @@ namespace FreeSql.Firebird.Curd
Exception exception = null;
try
{
ret = await _orm.Ado.QueryAsync<T1>(_connection, _transaction, CommandType.Text, sql, _commandTimeout, _params, cancellationToken);
ret = await _orm.Ado.QueryAsync<T1>(_table.TypeLazy ?? _table.Type, _connection, _transaction, CommandType.Text, sql, _commandTimeout, _params, cancellationToken);
}
catch (Exception ex)
{