Skip to content
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

[Bugfix] Edition : exec a DELETE can return 0 in some cases #5093

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

rldhont
Copy link
Collaborator

@rldhont rldhont commented Dec 6, 2024

jDbConnection::exec() returns the number of affected rows or False if the query has failed.

In some cases, for exemple a DELETE on a view or a DELETE catched by a trigger, this method can return no affected rows. So Lizmap has to rollback() executed requests only if a query has failed.

Funded by Conseil Départemental du Calvados and Ville d'Avignon

@github-actions github-actions bot added this to the 3.10.0 milestone Dec 6, 2024
@rldhont rldhont added the run end2end If the PR must run end2end tests or not label Dec 6, 2024
`jDbConnection::exec()` returns the number of affected rows or False if the query has failed.

In some cases, for exemple a DELETE on a view or a DELETE catches by a trigger can return no affected rows.
So lizmap has to rollback() executed requests only if a query has failed.

Funded by Conseil Départemental du Calvados and Ville d'Avignon
@rldhont rldhont force-pushed the fix-delete-from-view-return-no-changes branch from 8c991d9 to 3ca18f4 Compare December 6, 2024 17:19
@rldhont rldhont requested review from laurentj and mdouchin December 9, 2024 09:23
@rldhont rldhont merged commit 7d44597 into 3liz:master Dec 11, 2024
13 checks passed
nboisteault pushed a commit to nboisteault/lizmap-web-client that referenced this pull request Dec 12, 2024
…-no-changes

[Bugfix] Edition : exec a DELETE can return 0 in some cases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release_3_8 backport release_3_9 data editor run end2end If the PR must run end2end tests or not sponsored development This development has been funded
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants