You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cannot set custom foreign key constraint name using decorators. Actually I am setting { constraints: false } in @BelongsTo decorator and adding foreign keys with specified names using queryInterface.
Expected behavior
I there an option to specify foreign key constraint name using decorators? If not, do you plan to add this feature ?
Steps to reproduce
Related code
/* Table A */
@HasMany(()=>B)bs: B[]/* Table B */
@ForeignKey(()=>A)
@Column({allowNull: false})aId: number
// I want to specify key name, for eg. 'FK_my_custom_named_key'
@BelongsTo(()=>A,{foreignKey: 'aId',constraints: false})a: A
The text was updated successfully, but these errors were encountered:
According to inline documentation and the compiler itself the following syntax is acceptable, however it is my experience that this has no effect and this value is ignored.
Issue
Cannot set custom foreign key constraint name
Versions
2.1.5
Issue type
Actual behavior
Cannot set custom foreign key constraint name using decorators. Actually I am setting { constraints: false } in @BelongsTo decorator and adding foreign keys with specified names using queryInterface.
Expected behavior
I there an option to specify foreign key constraint name using decorators? If not, do you plan to add this feature ?
Steps to reproduce
Related code
The text was updated successfully, but these errors were encountered: