manifest
manifest copied to clipboard
FK error on deleting item with children
With the npx add-manifest go to Owners and try to delete an Owner that has Cats. You will have the following error:
[Nest] 170274 - 05/31/2024, 4:38:38 PM ERROR [ExceptionsHandler] SQLITE_CONSTRAINT: FOREIGN KEY constraint failed
QueryFailedError: SQLITE_CONSTRAINT: FOREIGN KEY constraint failed
at Statement.handler (/home/brunobuddy/Codebases/case-app/case/packages/core/manifest/src/driver/sqlite/SqliteQueryRunner.ts:135:29)
I think it is more a question rather than a bug, at the end we will probably need to chose a behavior like CASCADE or RESTRICT for those relations, but we need also to define UX and defaults. What should be the default behavior ?