Skip to content

Commit

Permalink
fix(batch-update): use c.BatchEffectedIDs instead of batchUpdate.IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
0xJacky committed Oct 25, 2024
1 parent a4a00f8 commit 40f4c76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion batch_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (c *Ctx[T]) BatchModify() {
db = db.Table(c.table, c.tableArgs...)
}

err = db.Model(&c.Model).Where(c.itemKey+" IN ?", batchUpdate.IDs).
err = db.Model(&c.Model).Where(c.itemKey+" IN ?", c.BatchEffectedIDs).
Select(c.GetSelectedFields()).Updates(&c.Model).Error
if err != nil {
errHandler(c.Context, err)
Expand Down

0 comments on commit 40f4c76

Please sign in to comment.