mirror of https://github.com/go-gorm/gorm.git
Merge pull request #4479 from wuwenchi/master
Fix document for Pluck's usage #4473
This commit is contained in:
commit
6d64e31965
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue