Skip to content

DocumentId with slash #172

Closed
Closed
@mauro-rogledi

Description

@mauro-rogledi

If a document ID contains slash, the saved document is incorrect.

Example:

var mockData = new MockData()
{
    Id="1/bis",
    itemCode = "123/456",
    description = "Id with slash"
};

var _client = new CouchClient("http://localhost:5984", c =>
c.UseBasicAuthentication("admin", "admin"));
var couchInventory = await _client.GetOrCreateDatabaseAsync<MockData>();

await couchInventory.AddOrUpdateAsync(mockData);

The resulting document on CouchDB will be:

{
  "_id": "1",
  "_rev": "7-04057498ac9aa09f84230be53415b3e5",
  "_attachments": {
    "bis": {
      "content_type": "application/json; charset=UTF-8",
      "revpos": 1,
      "digest": "md5-7vWis1l5PCY91TEq7KmMhQ==",
      "length": 100,
      "stub": true
    }
  }
}

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions