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

Referential integrity update #44

Merged
merged 4 commits into from
Aug 20, 2020
Merged

Referential integrity update #44

merged 4 commits into from
Aug 20, 2020

Conversation

bihanviranga
Copy link
Owner

Implemented in this commit

  • Cannot delete brands if it has tickets.
  • Cannot delete categories if it has tickets.
  • Cannot delete companies if it has tickets.
  • Cannot delete modules if it has tickets.
  • Cannot delete products if it has tickets.
  • When attempting to delete these entities, if they have tickets, the server will return a 400 status code.

Notes

  • SQL script was updated. But the generated dbcontext class was functionally identical to the previous one. So this branch is still using the old dbcontext class.
  • Got some issues trying to enforce referential integrity from database engine. Apparently it's a problem that happens when going DB-first. Worked around it by handling it at the code level.
  • reference 1
  • reference 2

Copy link
Collaborator

@DhFernando DhFernando left a comment

Choose a reason for hiding this comment

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

well done bokka

@DhFernando DhFernando merged commit 46767e7 into master Aug 20, 2020
@bihanviranga bihanviranga deleted the dbrefint_update branch December 6, 2020 15:10
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.

2 participants