Skip to content

Commit ffe1c78

Browse files
authored
fix: allow $set null (remove association) (#774)
1 parent 6b1e3ff commit ffe1c78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/model/model/model.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export abstract class Model<TModelAttributes extends {} = any, TCreationAttribut
5151
* Sets relation between specified instances and source instance
5252
* (replaces old relations)
5353
*/
54-
$set<R extends Model>(propertyKey: keyof this, instances: R | R[] | string[] | string | number[] | number, options?: AssociationActionOptions): Promise<unknown> {
54+
$set<R extends Model>(propertyKey: keyof this, instances: R | R[] | string[] | string | number[] | number | null, options?: AssociationActionOptions): Promise<unknown> {
5555
return this['set' + capitalize(propertyKey as string)](instances, options);
5656
}
5757

0 commit comments

Comments
 (0)