Couchbase Lite 2.8.5 Android/iOS - QueryBuilder results missing properties

Hello everyone,

So lately I have been seeing something quite weird in Couchbase Lite 2.8.5 that we have reproduced in both our Android and iOS application. When using the QueryBuilder, we can end up in a scenario where the query results are missing keys if:

  • The size of the select clause is large, for example, a select on 30 properties
  • If 1 or more of the properties we are doing the select on is not present on the document.

For example, let’s say I have this:


If for some reason properties “a” through “h” are not actually present on the doc, it could cause other properties that are actually present on the doc to go missing from the query results. This could also happen even if it’s just “a” that is missing from the document. So in this case, if property “y” is actually on the doc, it could end up missing.

The more selects you do on properties that are not present on the document, the more properties that are present on the document disappear from the query results.

It seems like SelectResult.all() could be a workaround for this, but either way this seems like weird behavior.

I cannot reproduce the issue you describe. If you have code that will demonstrate it, I’d love to see it.

I did this:

MutableDocument doc = new MutableDocument();
        doc.setString("i", "i");
        doc.setString("j", "j");
        doc.setString("k", "k");
        // ...
        doc.setString("10", "10");
        doc.setString("11", "11");
        doc.setString("12", "12");;

        List<Result> results =
                // ...

… and got exactly the expected result:

    1 => 1
    2 => 2
    3 => 3
    4 => 4
    5 => 5
    6 => 6
    i => i
    id => ecb15c7c-152c-496f-aa1d-a6e7daafc9d4
    j => j
    k => k
    l => l
    m => m
    n => n
    o => o
    p => p
    q => q
    r => r
    revisionID => 1-cf887b8201f73bd073cb0cab32935f7ce1774d74
    s => s
    t => t
    u => u
    v => v
    w => w
    x => x
    y => y
    z => z

I note that your projection contains an error that will prevent it from running: the duplicated property “f”

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.