SaveArbitraryDocuments fails due to Json stream being in invalid state #12

Merged
merged 1 commit into from Nov 11, 2012

Conversation

Projects
None yet
2 participants
Contributor

RoystonS commented Nov 28, 2010

Hi there,

I've found a problem with Divan with SaveArbitraryDocuments. Basically, it doesn't work because when CouchBulkDocuments writes itself out, it always assumes that its contained objects are not ISelfContained, and so always wraps their writes with a StartObject/EndObject. This fails for SaveArbitraryDocuments as that works with CouchDocumentWrapper, which does implement ISelfContained.

I've added a unit test, and popped a fix in. If it looks right, do feel free to pull the change in.

Cheers,
Royston.

SaveArbitraryDocuments failed because CouchBulkDocuments always did a…
… StartObject/EndObject even if the contained object was self-contained.

Added a unit test to cover this.

henrikwallstrom added a commit that referenced this pull request Nov 11, 2012

Merge pull request #12 from RoystonS/master
SaveArbitraryDocuments fails due to Json stream being in invalid state

@henrikwallstrom henrikwallstrom merged commit b384a61 into foretagsplatsen:master Nov 11, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment