-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
add PRIMARY KEY and AUTOINCREMENT for spatialite offlineediting #8023
add PRIMARY KEY and AUTOINCREMENT for spatialite offlineediting #8023
Conversation
Does this work if
|
Thanks. |
For my understanding, how does it work? Let's say you have one feature with an id 1, and you go offline. |
Yes. db keep id 2 and the feature from spatialite with id 2 up to id 3. I discover this plugin. |
Ah yes, that might be taken care of with In this case, what's the advantage of having a primary key set if it's not stable? Isn't the original problem (which were sync problems I guess) already solved by the current What I am worried a bit is about stability of primary keys in relation scenarios. But I must admit I also don't have the ultimate solution yet. Another thing to verify is that it's compatible with #8035 (but I assume it is). |
As I understood (and already seen using), you can have relationships with IDs on your offline base.
Sadly, me too. |
Which is a nice thing to support. But if I understand the above statement right, the primary key will be adjusted on sync back, but not the foreign key. But this is is neither more nor less save than before. What I still wonder: which scenario does this fix? |
The case I had met was very simple: no modification directly in the database, it still does not go through offline modifications and then an online import, without any possible conflict, since the modifications are successive. |
What's the status here? @m-kuhn are you happy? |
To understand this right, the proposal here is:
For databases with no to very little configuration at all and a single user, this will ease maintenance setup time and maintenance I assume. How does this behave in a scenario with multiple users or partial extracts from the database (only features in a given area). Will this not lead to id collisions and merge conflicts on sync? |
I think this is more of a debate about the process than about the tool. According to our tests (see above), there is a rise in the id so there are no conflicts. |
We are talking about a tool that is already in use in processes
... in the processes and workflows that you are targeting in this test
I know of several organizations using this tool for parallel data acquisition, they avoid conflicts by working in clearly defined spatially distributed areas. So far they can use offline editing for their workflow and I am afraid (but not sure since I don't have all the system setups in mind) that this might break the workflow. On the other hand, the big advantage of this is also still a bit unclear to me. Without this change: there is no primary key generated (so it's NULL) and the database will assign one on commit, no? |
I can understand your point of view. So, it could be a "not be fixed" and we will close the issue? @yjacolin what is your opinion? |
I'm not totally opposed to it if there is an ultimate benefit of it. I just need to have that one presented here first ;) It could also be an option (although I don't like options too much) if it's worth it And there is now also gpkg as offline format which by definition gets a fid, not sure if that also solves some of the issues |
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
|
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. |
Description
fixes #5938 (https://issues.qgis.org/issues/5938)
cc @yjacolin
Checklist
fixes #11111
in the commit message next to the description[FEATURE]
in the commit message[needs-docs]
in the commit message and contain sufficient information in the commit message to be documentedscripts/prepare-commit.sh
script before each commit