From 5f8eb094dba6d7b8a3bf56e72cf1a4ff570800f6 Mon Sep 17 00:00:00 2001 From: John Pinkster Date: Tue, 11 Apr 2017 10:08:43 -0400 Subject: [PATCH] FIX/Distinct in FindOptions The `FIndOptions` is applied for the `findAndCount` and `findAndCountAll`. For the count to be accurate with relationships, you need to be able to apply the `disinct` flag. This update will allow us to utilize the interface in those situations. --- types/sequelize/v3/index.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/types/sequelize/v3/index.d.ts b/types/sequelize/v3/index.d.ts index 3f8fd0e1a4..e823a926e2 100644 --- a/types/sequelize/v3/index.d.ts +++ b/types/sequelize/v3/index.d.ts @@ -3211,6 +3211,11 @@ declare namespace sequelize { * https://github.com/sequelize/sequelize/blob/master/docs/docs/models-usage.md#user-content-manipulating-the-dataset-with-limit-offset-order-and-group */ group?: string | string[] | Object; + + /** + * Apply DISTINCT(col) for FindAndCount(all) + */ + distinct?: boolean; } /**