When i try to GET/api/v1/products?name[category]=Category 1 it outputs val.replace is not a function error
But according to sequelize documentation on here, the way of querying relations/associations is by using its include parameter and then append its where parameter inside.
Maybe you could allow the current include parameter to accept object kind of: include[]={model: 'category', where:{name: 'Category 1'}} ?
I have 2 models:
* product with 1 field: name
* category with 1 field: name
Association is:
* product belongsTo category
The problem is:
When i try to **GET** `/api/v1/products?name[category]=Category 1` it outputs **val.replace is not a function** error
But according to sequelize documentation on [here](http://docs.sequelizejs.com/en/latest/docs/querying/#relations-associations), the way of querying relations/associations is by using its **include** parameter and then append its **where** parameter inside.
Maybe you could allow the current **include** parameter to accept object kind of:
`include[]={model: 'category', where:{name: 'Category 1'}}` ?
@labibramadhan hmmm… the latter suggestion, ?include[]={"model": "category", "where":{"name": "Category 1"}} should work. Just make sure you're sending valid JSON. Let me know if it doesn't work!
@labibramadhan hmmm… the latter suggestion, `?include[]={"model": "category", "where":{"name": "Category 1"}}` should work. Just make sure you're sending valid JSON. Let me know if it doesn't work!
@joeybaker, as i've mentioned, i think it doesn't work. seems like include parameter only accepts string or array of string

@joeybaker, as i've mentioned, i think it doesn't work. seems like **include** parameter only accepts **string** or **array of string**
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
I have 2 models:
Association is:
The problem is:
When i try to GET
/api/v1/products?name[category]=Category 1it outputs val.replace is not a function errorBut according to sequelize documentation on here, the way of querying relations/associations is by using its include parameter and then append its where parameter inside.
Maybe you could allow the current include parameter to accept object kind of:
include[]={model: 'category', where:{name: 'Category 1'}}?@labibramadhan hmmm… the latter suggestion,
?include[]={"model": "category", "where":{"name": "Category 1"}}should work. Just make sure you're sending valid JSON. Let me know if it doesn't work!@joeybaker, as i've mentioned, i think it doesn't work. seems like include parameter only accepts string or array of string
@labibramadhan ah! that makes sense. It should accept an array of JSON strings and doesn't.
alright, i have created PR, please review @joeybaker