Open hehaka opened 7 years ago
I have same issue.
does epilogue is not maintained?
I found workaround with milestone.
<targetResource>.use({
list: {
fetch: {
before: function (req, res, context) {
context.options.col = '<col> ex: "TableName"."primaryKey" ';
context.options.distinct = true;
return context.continue;
}
}
}
})
Hi, For the models which use associations through include there is an wrong count in the Content-Range header of the epilogue library.
According to https://github.com/sequelize/sequelize/issues/7225 You need to use distinct = true in the findAndCountAll options.
I have made a local workaround in the Controllers/list.js List.prototype.fetch = function(req, res, context) function by putting options.distinct = true;
You should populate it to the resource function options of the library.