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

[WIP] BUG: postgres serial id conflict during an upsert join, fix #33148 #34216

Conversation

SebastienPeillet
Copy link
Contributor

Description

fix #33148, @devfaz74 provides data test in it.

As explained in the issue, serial type column causes broken link between parent and child table using the upsert on edit feature.

The default values nextval('public.parent_id_seq'::regclass) is used to create the child entity but there is no update when parent entity is commited (and nextval('public.parent_id_seq'::regclass) is converted to int value during this step so the link is broken).

The (not obvious for users) solution is to activate the evaluateDefaultValues option in the project properties menu.

Maybe we should activate this option by default when a join is added with the upsertOnEdit flag. That what I propose in this PR, but I am not sure it's the best solution because :

  • It doesn't keep information about previous state of evaluateDefaultValues, if the user remove the join in the future.
  • I don't know if there is specific contraindications to the use of evaluateDefaultValues option...

I let the subject opened to other solution. If this one is accepted I will create the test in consequence.

Checklist :

…n is added, resolve postgres serial id conflict, fix qgis#33148
@stale
Copy link

stale bot commented Feb 17, 2020

The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check

  • that all unit tests are passing

  • that all comments by reviewers have been addressed

  • that there is enough information for reviewers, in particular

    • link to any issues which this pull request fixes

    • add a description of workflows which this pull request fixes

    • add screenshots if applicable

  • that you have written unit tests where possible
    In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request.
    If there is no further activity on this pull request, it will be closed in a week.

@stale stale bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Feb 17, 2020
@SebastienPeillet
Copy link
Contributor Author

Does someone has an opinion on this ?

@stale stale bot removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Feb 19, 2020
@github-actions github-actions bot added this to the 3.14.0 milestone Mar 4, 2020
@stale
Copy link

stale bot commented Mar 18, 2020

The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check

  • that all unit tests are passing

  • that all comments by reviewers have been addressed

  • that there is enough information for reviewers, in particular

    • link to any issues which this pull request fixes

    • add a description of workflows which this pull request fixes

    • add screenshots if applicable

  • that you have written unit tests where possible
    In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request.
    If there is no further activity on this pull request, it will be closed in a week.

@stale stale bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Mar 18, 2020
@stale
Copy link

stale bot commented Mar 26, 2020

While we hate to see this happen, this PR has been automatically closed because it has not had any activity in the last 21 days. If this pull request should be reconsidered, please follow the guidelines in the previous comment and reopen this pull request. Or, if you have any further questions, just ask! We love to help, and if there's anything the QGIS project can do to help push this PR forward please let us know how we can assist.

@stale stale bot closed this Mar 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Uh oh! Seems this work is abandoned, and the PR is about to close.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to add a new feature when joining two PostGIS tables
1 participant