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

Query syntax error? #81

Open
gutenye opened this issue Aug 7, 2016 · 1 comment
Open

Query syntax error? #81

gutenye opened this issue Aug 7, 2016 · 1 comment

Comments

@gutenye
Copy link

gutenye commented Aug 7, 2016

Waterline query is https://github.com/waterlinejs/waterline#pagination

Users.find().limit(10).skip(20)

But trailpack-waterline use https://github.com/trailsjs/trailpack-waterline/blob/master/api/services/FootprintService.js#L53

query = Model.find(criteria)

It will get an error in this example:

GET /users?limit=10&offset=20
-> Model.find({limit: 10, offset: 20})
-> actually should be: Model.find().limit(10).skip(20)

I'm both new to trails and waterline, not sure if it's a bug.

@gutenye
Copy link
Author

gutenye commented Aug 7, 2016

Actually, waterline supports Model.find({limit: 10, skip: 20}), so I think we need a tansformer to transform trails query to waterline query.

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