jaystack / jaydata

Notice: this library isn't maintained anymore
http://jaydata.org
GNU General Public License v2.0
352 stars 94 forks source link

Odata v4 and contains function #249

Closed genusP closed 8 years ago

genusP commented 8 years ago

I use Jaydata 1.5.3 For this code:

context.onReady().then(ctx=>ctx.Organisations
            .filter("it.Name.contains(this.q) || it.Name.contains(this)", { q: q })
            .toArray()
            .then(cb));

generates a condition:$filter=(substringof('tvv',Name) or substringof('{"q":"tvv"}',Name)) In oData v4 substringof replaced to contains