Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arango Query filter never executed #183

Open
izhur opened this issue Apr 9, 2018 · 1 comment
Open

Arango Query filter never executed #183

izhur opened this issue Apr 9, 2018 · 1 comment

Comments

@izhur
Copy link

izhur commented Apr 9, 2018

I see in lib/adapters/arango.js line 263

Object.keys(filter.where).length === 0 on if condition made, no filter on query will be executed.

should it be

Object.keys(filter.where).length !== 0 ??

This is lib/adapters/arango.js
line 262 to 269

if (filter) {
        if (filter.where && Object.keys(filter.where).length === 0) {
            var csql = self.buildWhere(filter.where, self, model);
            query.push(csql.query.join(' '));
            Object.keys(csql.bindVars).forEach(function (bkey) {
                bindVars[bkey] = csql.bindVars[bkey];
            });
        }
@izhur
Copy link
Author

izhur commented Apr 27, 2018

fork commit andrevandal@baaf0a1 fixed this, and having better handling for auto create collections

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

No branches or pull requests

1 participant