duplicate results in queries
See original GitHub issueI 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)
Issue Analytics
- State:
- Created 6 years ago
- Comments:15 (6 by maintainers)
Top Results From Across the Web
Why are there duplicates in the query results and how to ...
To minimize the appearance of duplicate rows in the query results: · Limit the number of output fields, especially one-to-many fields, such as...
Read more >How to Find Duplicate Values in SQL - LearnSQL.com
Using the GROUP BY clause to group all rows by the target column(s) – i.e. the column(s) you want to check for duplicate...
Read more >Debugging duplicated data in SQL query results - Metabase
What to do when your query returns data with duplicated rows or columns. · Option 1: Use an INNER JOIN with a one-to-many...
Read more >How to Find Duplicate Values in a SQL Table - Chartio
This tutorial will teach you how to find these duplicate rows. To follow along, you'll need read access to your database and a...
Read more >An Intro to Resolving Duplicate Results in SQL Queries
My first attempt to remove the duplicates was to add the DISTINCT keyword to my query, but that didn't fix the problem –...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I can confirm that this solved my issues of having duplicates in results.
Did not come up again, so I assume this is fixed.