Exact key comparison for compound keys in .Net


#1

Hello, I’m tryng to get items from a view with compound key, but I can’t get anything if I do exact coparison.

var keys = new object[] {
new object[] { "0" }, new string[] { "0" }, new object[] { 0 },
"[0]", "[\"0\"]", "{[0]}", "{[\"0\"]}",
new JArray("0"), new JArray(0),
new List<object> { "0"}, new List<object> { 0}, new List<string> { "0" }};

query.Keys = keys; query.InclusiveEnd = true; query.InclusiveStart = true;
query.Execute();

returns 0 records, although I emit items with following key:new List<object>{"0"}

Is that a bug?
Everything works with simple key. Also it works if I use StartKey and EndKey.

I’m using Couchbase.Lite 1.1.2 for .Net in a Xamarin project for iOs


#2

Yes this is a bug and currently I am debating on how to resolve it. One suggestion is in a pull request here. This should be resolved before 1.2.