You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 toNULL
before running theINSERT 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.The text was updated successfully, but these errors were encountered: