impl entities and test
This commit is contained in:
@@ -310,6 +310,14 @@ func applySet(doc, operator bson.M) (bson.M, error) {
|
||||
if k == entity.ID {
|
||||
continue
|
||||
}
|
||||
if k == "." {
|
||||
m, ok := v.(bson.M)
|
||||
if !ok {
|
||||
return nil, errors.New("cannot assign non-map to doc")
|
||||
}
|
||||
doc = m
|
||||
return doc, nil
|
||||
}
|
||||
nesting := strings.Split(k, ".")
|
||||
if len(nesting) > 1 {
|
||||
mInterface, ok := doc[nesting[0]]
|
||||
|
||||
Reference in New Issue
Block a user