From 63f65343d34564eb26ce0db8ef93484034d64aed Mon Sep 17 00:00:00 2001 From: Judahh Date: Sat, 7 Oct 2023 14:48:56 -0300 Subject: [PATCH] add attributes --- package.json | 2 +- source/sequelizePersistence.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 42470a4..15da8d3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@flexiblepersistence/sequelize", - "version": "2.2.25", + "version": "2.2.26", "description": "A Sequelize implementation for Flexible Persistence's PersistenceAdapter", "main": "dist/source/index.js", "keywords": [ diff --git a/source/sequelizePersistence.ts b/source/sequelizePersistence.ts index 74d3137..1374d89 100644 --- a/source/sequelizePersistence.ts +++ b/source/sequelizePersistence.ts @@ -364,6 +364,7 @@ export class SequelizePersistence implements IPersistence { include?: Includeable | Includeable[], group?: GroupOption, order?: Order, + attributes?: ModelAttributes, data?, receivedMethod?: string, input?: IInput, @@ -384,6 +385,7 @@ export class SequelizePersistence implements IPersistence { limit, offset, include, + attributes: group ? attributes : undefined, group, order, transaction, @@ -399,6 +401,7 @@ export class SequelizePersistence implements IPersistence { limit, offset, include, + attributes: group ? attributes : undefined, group, order, transaction, @@ -489,6 +492,7 @@ export class SequelizePersistence implements IPersistence { const include = element.getMethodInclude(method, receivedMethod, selected); const group = element.getMethodGroup(method, receivedMethod, selected); const order = element.getMethodOrder(method, receivedMethod, selected); + const attributes = element.getAttributes(selected) as ModelAttributes; const transaction = await this.sequelize.transaction(); return await this.sendRequest( element, @@ -500,6 +504,7 @@ export class SequelizePersistence implements IPersistence { include, group, order, + attributes, data, isSingleDeleteOrUpdate ? receivedMethod : undefined, input,