Closed dmarcelino closed 9 years ago
Thanks for posting, @dmarcelino. I'm a repo bot-- nice to meet you!
It has been 30 days since there have been any updates or new comments on this page. If this issue has been resolved, feel free to disregard the rest of this message. On the other hand, if you are still waiting on a patch, please:
Thanks so much for your help!
@dmarcelino Has there been any progress regarding this issue? This is still an issue on waterline-sequel 0.6.4
Hey @AmirTugi, you'll have to ask someone from the sails team.
So I sat around trying to to see where the issue starts from, and I realized the problem was actually not a problem in the code, but rather I did not encode the URL I used to retrieve the data by SailsJS blueprints routes. So after I encoded it, everything worked like a charm. Thanks anyway
*SQL adapters
contains
' criteria acts as aLIKE '%[value]%'
but it shouldn't as the documentation does not implycontains
is meant to take SQL syntax:From the documentation:
Given
contains
is meant to be consistent across adapters, the value should be escaped in SQL adapters. For exampleModel.find().where({name: {contains: "%"}}
should becomeselect * where name like '%\%%'
.The issue seems to lie in the criteria processor here: https://github.com/balderdashy/waterline-sequel/blob/master/sequel/lib/criteriaProcessor.js#L623-L645
Originally raised by @cspotcode in balderdashy/waterline#899 (click for details and discussion).