Skip to content

Conversation

Tape
Copy link
Contributor

@Tape Tape commented Nov 13, 2013

This change will not affect any existing results, however the use of such a feature looks like it's only compatible with SQL databases. I included a test case but I could not get it to pass on MongoDB (as such I have commented it out, but these tests will pass on MySQL, Postgres, and SQLite).

I was doing a chain find filter to do 2 separate queries: 1 would fetch a count of all results, one would use the exact same chain find data and do a count on it (for pagination reasons). While the regular .find() was returning the correct results (8 results), the count would return incorrect results since the merge information was absent (24 results), throwing off the pagination count data. This simple change will take that into account.

@dxg
Copy link
Collaborator

dxg commented Jan 16, 2014

I took a look at this today.
The test passes, but there is a problem; the test also passes if I remove your changes from ChainFind.js.
Can you please tweak the test so that it fails once your changes are removed from ChainFind? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants