when we were making a request on PATCH /users/{id}, we couldn't pass the "address" tag without the server producing an error. When the old addresses were
removed, they were not deleted, it was only the link which was. So I simply set the parameter orphanRemoval to true in the call to the annotation OneToMany
on top of the address field in the User entity. Now, when an address is removed, it is also deleted from the database
Closes #32
Description
Fixed issue #32
Checklist
Implementation
[x] Files and variables have a name explaining what they do.
[x] Updating the DB schemas and seeding the tables do not generates errors.
[x] All code repeted more than 2 times has been refactored in a dedicated file or function.
[x] Debugs have been removed : dd() | dump()
Tools
[x] PHP CS Fixer has fixed all files inside the src folder.
[x] All commits have been done using Commitizen.
Documentation
[x] All new classes and non-trivial functions have a code documentation.
[x] There are comments to explain complex parts inside your code.
[x] If a new folder is created, it has been added and explained inside the "Folder structure" part of the README.md file.
when we were making a request on PATCH /users/{id}, we couldn't pass the "address" tag without the server producing an error. When the old addresses were removed, they were not deleted, it was only the link which was. So I simply set the parameter orphanRemoval to true in the call to the annotation OneToMany on top of the address field in the User entity. Now, when an address is removed, it is also deleted from the database
Closes #32
Description
Fixed issue #32
Checklist
Implementation
dd()
|dump()
Tools
src
folder.Documentation
README.md
file.