From c4cadd3acbb736edbbb772175bdd8cba7eaade7a Mon Sep 17 00:00:00 2001 From: Emad Saud Date: Sat, 12 Apr 2025 13:37:51 +0200 Subject: [PATCH] docs: fix incorrect example of attributes in Model Querying Basics docs --- .../core-concepts/model-querying-basics.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/versioned_docs/version-6.x.x/core-concepts/model-querying-basics.md b/versioned_docs/version-6.x.x/core-concepts/model-querying-basics.md index 4587299fe..bfd01854b 100644 --- a/versioned_docs/version-6.x.x/core-concepts/model-querying-basics.md +++ b/versioned_docs/version-6.x.x/core-concepts/model-querying-basics.md @@ -69,7 +69,10 @@ Attributes can be renamed using a nested array: ```js Model.findAll({ - attributes: ['foo', ['bar', 'baz'], 'qux'], + attributes: [ + ['foo', 'baz'], + ['baz', 'qux'], + ], }); ``` @@ -81,7 +84,10 @@ You can use [`sequelize.fn`](pathname:///api/v6/class/src/sequelize.js~Sequelize ```js Model.findAll({ - attributes: ['foo', [sequelize.fn('COUNT', sequelize.col('hats')), 'n_hats'], 'bar'], + attributes: [ + ['foo', 'bar'], + [sequelize.fn('COUNT', sequelize.col('hats')), 'n_hats'], + ], }); ```