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

feat: add schema support for orphanedRowAction #7625

Merged
merged 1 commit into from
May 8, 2021

Conversation

JamieWritesCode
Copy link
Contributor

Adds support for setting the action for orphaned relation rows when using separate entity definitions

Fixes #7417

Description of change

As described in #7105 it's useful to be able to delete an orphaned relationships row however that pull request only added support for enabling the behaviour with decorators. This pull request also adds support for the orphanedRowAction prop in EntitySchemaRelationOptions so we can also use it when defining our models using separate entity schemas.

Pull-Request Checklist

  • Code is up-to-date with the master branch
  • npm run lint passes with this change
  • npm run test passes with this change
  • This pull request links relevant issues as Fixes #0000
  • There are new or updated unit tests validating the change
  • Documentation has been updated to reflect this change
  • The new commits follow conventions explained in CONTRIBUTING.md

Adds support for setting the action for orphaned relation rows when using separate entity definitions

Fixes typeorm#7417
@AlexMesser AlexMesser merged commit a8eb49a into typeorm:master May 8, 2021
@AlexMesser
Copy link
Collaborator

thank you for contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add 'orphanedRowAction' option to EntitySchema
2 participants