JSData `where` does not work with `dataStore.findAll()`

91 Views Asked by At

If I call dataStore.findAll(mapperName, params, opts) where params is

{
  where: {
   cc: {
     '===': 'test'
   }
  },
}

I expect the resulting query string to be ?cc=test. However, it seems to encode the whole object as the resulting query string is ?where=%7B%22cc%22:%7B%22%3D%3D%3D%22:%22test%22%7D%7D. Does JSData's query feature not work with the http adapter?

This is on js-data and js-data-http v3

1

There are 1 best solutions below

0
On

Your syntax is the filter syntax, whereas you should be able to do the following for findAll syntax:

{cc: 'test'}