Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue 127 no sourceKey param in AssociationOptions interface #128

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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