dbal
dbal copied to clipboard
FK violation exception is not converted to ForeignKeyConstraintViolationException with Sqlite
Q | A |
---|---|
Version | 3.3.7 |
Summary
Currently, a general DBAL driver exception is thrown even if the error code is 23000 representing a FK violation for Sqlite.
Current behaviour
DBAL driver exception is thrown.
How to reproduce
Insert a row violating at least one FK.
Expected behaviour
Instance of ForeignKeyConstraintViolationException
exception is thrown (exception is converted).
Insert a row violating at least one FK.
Please be more specific. There are several scenarios like this covered by Functional\ExceptionTest
.
Is the issue reproducible on 3.4.x
? It may have been fixed by https://github.com/doctrine/dbal/pull/5409.
The https://github.com/doctrine/dbal/pull/5409 does not fix this issue.
Thank you for pointing to the tests - I will check.
Closing due to the lack of feedback.
weird, https://github.com/atk4/data/blob/9e7a43525bd887eb01145076ede775bb4e621553/src/Persistence/Sql/DbalDriverMiddleware.php#L119 is needed in atk4/data to pass the tests
did you try to reproduce?
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.