From 8bd8d38fe9f8762955d3a176d8301882794aca44 Mon Sep 17 00:00:00 2001 From: wuwenchi Date: Sat, 26 Jun 2021 21:23:16 +0800 Subject: [PATCH] Fix Pluck's usage #4473 --- finisher_api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/finisher_api.go b/finisher_api.go index 0f6440a3..51f394b4 100644 --- a/finisher_api.go +++ b/finisher_api.go @@ -474,7 +474,7 @@ func (db *DB) Scan(dest interface{}) (tx *DB) { // Pluck used to query single column from a model as a map // var ages []int64 -// db.Find(&users).Pluck("age", &ages) +// db.Model(&users).Pluck("age", &ages) func (db *DB) Pluck(column string, dest interface{}) (tx *DB) { tx = db.getInstance() if tx.Statement.Model != nil {