-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
[stable31] Port away from IQueryBuilder::execute in lib/ and tests/ and fix invalid usage of UniqueConstraintViolationException #55008
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
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 <[email protected]>
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 <[email protected]>
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.