Skip to content

Commit

Permalink
fix pluck error
Browse files Browse the repository at this point in the history
  • Loading branch information
feymanlee committed Nov 8, 2023
1 parent 467c079 commit 5324c01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion store.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ func (r *GormStore[M]) Find(ctx context.Context, criteria *Criteria) ([]M, error
}

func (r *GormStore[M]) Pluck(ctx context.Context, column string, dest any, criteria *Criteria) error {
err := r.present(ctx, criteria).Pluck(column, dest).Error
var model M
err := r.present(ctx, criteria).Model(&model).Pluck(column, dest).Error
r.reset()

return err
Expand Down

0 comments on commit 5324c01

Please sign in to comment.