Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/associations/base.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ export interface AssociationOptions {
*/
hooks?: boolean;

/**
* The name of the foreign key in the source table
*/
sourceKey?: string | ForeignKeyOptions;
Copy link
Collaborator

@felixfbecker felixfbecker Sep 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this this available for all of BelongsTo, HasOne, HasMany and BelongsToMany?


/**
* The alias of this model, in singular form. See also the `name` option passed to `sequelize.define`. If
* you create multiple associations between the same tables, you should provide an alias to be able to
Expand All @@ -68,6 +73,7 @@ export interface AssociationOptions {
*/
as?: string | { singular: string, plural: string };


/**
* The name of the foreign key in the target table or an object representing the type definition for the
* foreign column (see `Sequelize.define` for syntax). When using an object, you can add a `name` property
Expand Down