File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,9 @@ export interface IDefineOptions extends DefineOptions<any> {
4
4
modelName ?: string ;
5
5
6
6
/**
7
- * To enable optimistic locking.
7
+ * Enable optimistic locking. When enabled, sequelize will add a version count attribute
8
+ * to the model and throw an OptimisticLockingError error when stale instances are saved.
9
+ * Set to true or a string with the attribute name you want to use to enable.
8
10
*/
9
- version ?: boolean ;
11
+ version ?: boolean | string ;
10
12
}
Original file line number Diff line number Diff line change @@ -469,7 +469,7 @@ export declare class Model<T> extends Hooks {
469
469
/**
470
470
* version number automatically created by sequelize if table options.version is true
471
471
*/
472
- version ?: number ;
472
+ version ?: number | any ;
473
473
474
474
/**
475
475
* Returns true if this instance has not yet been persisted to the database
You can’t perform that action at this time.
0 commit comments