Closed
Description
In the function to load relations (loadRelations) DS is not parsing the parameters from the model relationship definition into a correct format for findAll().
e.g. my model definition includes:
hasMany: {
image: {
localField: 'images',
foreignKey: 'gallery_id',
}
}
And the line in loadRelations() that receives this is:
task = DS.findAll(relationName, params, options);
but here params is defined as:
Object {gallery_id: 6}
This is not compatible with your expect definition of params:
Object {where: Object}
where: Object
gallery_id: Object
==: 6
Therefore the findAll returns every instance of image instead of filtering by the 'where' clause.