-
Notifications
You must be signed in to change notification settings - Fork 286
Provide association options #34
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
Comments
Yeah i been reading the doc, but don't see any where to set 'CASCADE'. @RobinBuschmann can u shed some light here? |
Unfortunately this is currently not possible with the available decorators. So at the moment you have to rely on the automatically set configuration by sequelize. But this should be supported by sequelize-typescript. I will look into this and start implementing this feature as soon as possible. |
+1 |
This feature is now part of the 0.4.0-beta release ( |
should this be mentioned in the doc? it took me quite some time |
@BruceHem this can already be found here: https://github.com/RobinBuschmann/sequelize-typescript#foreignkey-belongsto-hasmany-hasone-belongstomany-api ..or do you think that an example would be a good idea? |
An example would be nice. And also I think we should show that this feature is available after 0.4.0-beta too. |
@RobinBuschmann do we have a sequelize-typescript chat group? |
@BruceHem You mean a chat like https://gitter.im/ ? What to you intend to achieve with a group chat? Should it be for questions, bugs, ...? |
Yes! |
@BruceHem I think it is better to keep one communication channel for now: github. A chat needs moderation and is much harder to be moderated than the github issues. |
I'm trying to set some association options. For example, I have a
HasMany
where I want to disallow null in the FK and cascade on delete.In Sequelize, I'd do something like:
I don't see any place in the association attributes or
ForeignKey
to pass in those options. See foreign keys (Their documentation on this subject is a bit messy).I'd like to be able to do the following, using BelongsTo as an example:
I'm using Sequelize 4, but I think the issue is the same for 3.
The text was updated successfully, but these errors were encountered: