More experimenting with tiedot

This commit is contained in:
Deluan
2016-02-27 03:35:01 -05:00
parent 4f9054b738
commit ecc0df9e7c
14 changed files with 175 additions and 35 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ func (r *BaseRepository) saveOrUpdate(rec interface{}) error {
if err != nil {
return err
}
docId, err := r.queryFirstKey(`{"in": ["Id"], "eq": "%s"}`, m["Id"])
docId, err := r.queryFirstKey(`{"in": ["Id"], "eq": "%s", "limit": 1}`, m["Id"])
if docId == 0 {
_, err = r.col.Insert(m)
return err