postgrelize / CreateOptions
Type Alias: CreateOptions<T> ​
CreateOptions<
T> =SaveOptions<T> &object
Defined in: src/model/write-options.ts:60
Options of create.
Extends SaveOptions.
Type Parameters ​
T ​
T = Values
Type Declaration ​
include? ​
optionalinclude?:IncludeOption
Create associated rows from nested values (Sequelize v6).
onConflict? ​
postgrelize extension
optionalonConflict?:OnConflictOptions<T>
Advanced ON CONFLICT handling. PostgreSQL extension.
See ​
Example ​
ts
const post = await Post.create(
{ title: 'Hello', author: { name: 'Ann' } },
{ include: [{ association: 'author' }], transaction },
);