You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But when wrapping the key with brackets in a querystring it fails.
var res = await fetch("http://127.0.0.1:8471/items?" + qs.stringify({
properties: {
"[oai.iai.al]": 80
}
}));
I'm thinking the express.urlencoded() middleware is parsing the brackets as a array. Feathers-Objection may need to check if the key contains periods and add the brackets itself.
Adding this to objectify() seems to help.
Object.keys(params || {}).forEach(key => {
let value = params[key];
// Wrap key with brackets if it contains a period.
if (parentKey && key.includes(".") && !key.match(/\[(.*)\]/)) {
key = "[" + key + "]";
}
if (_utils.default.isPlainObject(value)) {
return this.objectify(query, value, key, parentKey);
}
...
The text was updated successfully, but these errors were encountered:
When querying a jsonb column by a key containing a period, Objection needs the key to have square brackets around it. .
Objection example of how it looks.
Now when querying via feather's service.find() it works.
But when wrapping the key with brackets in a querystring it fails.
I'm thinking the express.urlencoded() middleware is parsing the brackets as a array. Feathers-Objection may need to check if the key contains periods and add the brackets itself.
Adding this to objectify() seems to help.
The text was updated successfully, but these errors were encountered: