.
This commit is contained in:
parent
403d7690b4
commit
8699edf2b6
@ -155,6 +155,7 @@ const generateService = (model, extraMethods = {}, options = defaultOptions) =>
|
|||||||
// Necesario para el cálculo del count
|
// Necesario para el cálculo del count
|
||||||
// https://github.com/sequelize/sequelize/issues/10557
|
// https://github.com/sequelize/sequelize/issues/10557
|
||||||
findOptions.distinct = true;
|
findOptions.distinct = true;
|
||||||
|
findOptions.col = model.primaryKey;
|
||||||
|
|
||||||
const result = await model.scope(context.scopes).findAndCountAll(findOptions);
|
const result = await model.scope(context.scopes).findAndCountAll(findOptions);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user