Menu

#2 Empty document is not saved correctly

open
nobody
None
5
2011-04-16
2011-04-16
No

When an empty document is saved in DataCollection::saveTo, sstream.tellp() returns -1 because nothing is written to the string stream. This results in an error when the document is send to MongoDB, because it sends the wrong length to the server (DOCUMENT_STATIC_SIZE + sstream.tellp() is 4, while it must be 5)

Discussion


Log in to post a comment.

MongoDB Logo MongoDB