Skip to content
This repository has been archived by the owner on Oct 15, 2018. It is now read-only.

MongoDB record count discrepancy between Native .find() and Sails .find() #133

Open
wlemahieu opened this issue Dec 8, 2016 · 0 comments

Comments

@wlemahieu
Copy link

wlemahieu commented Dec 8, 2016

It seems like there's an issue with how Model.Native works when using .find(). I was trying to figure out why a query I was running manually in MongoDB was returning 2310 records, but through Sails Native .find(), it was only returning 1000 records. When using the exact same query parameters but changing from Model.Native Collection.Find to just Sail's simpler Model.Find is all it took to bypass the issue. The count should be the same whether using Native or not. It's like an invisible limit(1000) is being applied, but even setting limit(0) doesn't resolve it for Native.

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

No branches or pull requests

1 participant