mirror of
https://github.com/mainnika/mongox-go-driver.git
synced 2026-05-22 15:53:36 +00:00
Retrieve the fields info from the type elem but not the value elem
This commit is contained in:
@@ -126,8 +126,12 @@ func (d *Database) createAggregateLoad(target interface{}, composed *query.Query
|
||||
pipeline = append(pipeline, primitive.M{"$limit": *composed.Limiter()})
|
||||
}
|
||||
|
||||
el := reflect.ValueOf(target).Elem()
|
||||
el := reflect.ValueOf(target)
|
||||
elType := el.Type()
|
||||
if elType.Kind() == reflect.Ptr {
|
||||
elType = elType.Elem()
|
||||
}
|
||||
|
||||
numField := elType.NumField()
|
||||
preloads, _ := composed.Preloader()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user