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

Ensure updates of notebooks and tags which clear guids from these data items are processed properly #72

Open
d1vanov opened this issue Aug 15, 2018 · 0 comments

Comments

@d1vanov
Copy link
Owner

d1vanov commented Aug 15, 2018

Within d1vanov/quentier#192 the necessity to update notes in a very special way was encountered: guids needed to have been cleared from notes which had non-empty guids previously. Turned out the "usual" INSERT OR REPLACE SQL query run within the local storage for data updates leads to the violation of foreign key - the "REPLACE" part of the query tries to delete the row and insert it again, the deletion fails because the row's guid is used as a foreign key in some other tables. The solution for notes was to explicitly update guid to NULL before running the INSERT OR REPLACE query. Need to do the same for updates of notebooks and tags as they are the subject for similar foreign key constraint issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant