mirror of
https://github.com/ent/ent.git
synced 2026-05-28 09:49:08 +03:00
entc/gen: use a set when tracking cleared fields in mutation template
Signed-off-by: Alex Snast <alexsn@fb.com>
This commit is contained in:
@@ -49,8 +49,8 @@ func (nd *NodeDelete) Exec(ctx context.Context) (int, error) {
|
||||
affected, err = nd.sqlExec(ctx)
|
||||
return affected, err
|
||||
})
|
||||
for i := len(nd.hooks); i > 0; i-- {
|
||||
mut = nd.hooks[i-1](mut)
|
||||
for i := len(nd.hooks) - 1; i >= 0; i-- {
|
||||
mut = nd.hooks[i](mut)
|
||||
}
|
||||
if _, err := mut.Mutate(ctx, nd.mutation); err != nil {
|
||||
return 0, err
|
||||
|
||||
Reference in New Issue
Block a user