[stable31] Port away from IQueryBuilder::execute in lib/ and tests/ and fix invalid usage of UniqueConstraintViolationException#55008
Conversation
300b431 to
e5cd471
Compare
|
Did my best to resolve conflicts 👀 Please give it a thorough look |
e5cd471 to
13d6ca2
Compare
UniqueConstraintViolationException is no longer throw directly but instead is now wrapped inside a \OCP\DB\Exception. So check the exception reason. Signed-off-by: Carl Schwan <carl.schwan@nextclound.com>
These are nowadays also OCP\DB\Exception and if the id is not a numeric deleting by id is also non working. Signed-off-by: Carl Schwan <carl.schwan@nextclound.com>
13d6ca2 to
adb0701
Compare
|
The test failures are related. I've only requested a backport of the UniqueConstraintViolationException commit, however IQueryBuilder.execute still throws a UniqueConstraintViolationException. So we either need to restore catching UniqueConstraintViolationException where we're still using IQueryBuilder.execute, or also backport the IQueryBuilder.executeStatement changes. This is particularly weird in Files/Cache, where we actually use both 😆 Wdyt @CarlSchwan? |
|
I would actually not backport this as it is more a refactor/port from deprecated code than a bug fix, if the goal is to fix an issue, I would backport only the specific code. |
I'd appreciate, if you can find a time to re-backport it) |
Backport of #54664
Warning, This backport had conflicts that were resolved with the⚠️
oursmerge strategy and is likely incompleteTodo
Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.