Skip to content

duplicate results in queries #97

@rootandy

Description

@rootandy

I have more than one condition like

myObjectBox.query()
.equal(MyObject_.relatedObjectId, 1)
.less(MyObject_.date, date)
.build().findIds()

on a object collection like

{id, relatedObjectId, date}
{1,1,2017-05-20},
{2,1,2017-05-21},
{3,1,2017-05-22},
{4,1,2017-05-23},

with date {2017-05-22} (including some time) i get the following result {1,2,3,1}

Why the hell is there a 1? I tried "life" on a debugger with an additional comparison to the relatedObject and got the result {1,1,2,3} - still not the thing i want to get. If I try to order them I get the error, that I just can use this option on unordered requests. That is strange and think its an issue. If I am wrong, tell me what I do wrong (the code is nearly a copy with some anonymizing of the variables)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions