From 4f936871886c06675e1ac4cbe4f4f863b8c5a3c4 Mon Sep 17 00:00:00 2001 From: Wojciech Stachowski Date: Thu, 23 Apr 2020 16:07:52 +0200 Subject: [PATCH] Allow $set null (remove association) --- src/model/model/model.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/model/model/model.ts b/src/model/model/model.ts index f55e867c..64e18aee 100644 --- a/src/model/model/model.ts +++ b/src/model/model/model.ts @@ -51,7 +51,7 @@ export abstract class Model extends OriginModel { * Sets relation between specified instances and source instance * (replaces old relations) */ - $set>(propertyKey: keyof this, instances: R | R[] | string[] | string | number[] | number, options?: AssociationActionOptions): Promise { + $set>(propertyKey: keyof this, instances: R | R[] | string[] | string | number[] | number | null, options?: AssociationActionOptions): Promise { return this['set' + capitalize(propertyKey as string)](instances, options); }