Can't write more then one JSON object to a collection
Closed this issue · 2 comments
bscott commented
When I attempt to write two objects to a single collection, only the first will get written.
torfason commented
This is not reproducible, a very minimal test verifies that this is not an issue, adapting the test case
// Write a fish to the database
fish1 := Fish{"The One Fish"}
fish2 := Fish{"The Two Fish"}
err = db.Write("mycollection", "fish1", fish1)
assert.Nil(err)
err = db.Write("mycollection", "fish2", fish2)
assert.Nil(err)
Results in two files:
───────┬───────────────────────────────────────────────────────────────────
│ File: scribbledb_111226993/collection/fish1.json
───────┼───────────────────────────────────────────────────────────────────
1 │ {
2 │ "Name": "The One Fish"
3 │ }
───────┴───────────────────────────────────────────────────────────────────
───────┬───────────────────────────────────────────────────────────────────
│ File: scribbledb_111226993/collection/fish2.json
───────┼───────────────────────────────────────────────────────────────────
1 │ {
2 │ "Name": "The Two Fish"
3 │ }
───────┴───────────────────────────────────────────────────────────────────
Of course, if this was an issue, scribble would be pretty useless, but it isn't. Perhaps it was way back when. This issue should be closed.
sdomino commented
Thanks for looking into this and validating things are still working.