|
|
@ -53,6 +53,8 @@ func LoadArray(db *mongox.Database, target interface{}, filters ...interface{}) |
|
|
|
elem := reflect.New(targetSliceElemT.Elem()) |
|
|
|
elem := reflect.New(targetSliceElemT.Elem()) |
|
|
|
if result.Decode(elem.Interface()) != nil { |
|
|
|
if result.Decode(elem.Interface()) != nil { |
|
|
|
targetSliceV = reflect.Append(targetSliceV, elem) |
|
|
|
targetSliceV = reflect.Append(targetSliceV, elem) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
continue |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
result.Decode(targetSliceV.Index(i).Interface()) |
|
|
|
result.Decode(targetSliceV.Index(i).Interface()) |
|
|
|