Use version method of optimistic concurrency instead of the whole document since older db versions when inserting an empty array actually put in an object, making the update at the end of add() not find the doc.