-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Handle internal relationships referencing rows that don't exist #14695
Conversation
…ich don't exist, this is a temporary measure as these relationships should be cleaned up correctly but for now ignore any which reference rows which no longer exist.
// check all the related rows exist | ||
const foundRecords = await this._db.getMultiple( | ||
links.map(l => l.id), | ||
{ allowMissing: true, excludeDocs: true } | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused, this doesn't seem to line up with the PR description. It looks like you're checking for existing links to a document on save, not looking for links to documents that don't exist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we're deciding whether or not the validation is correct by getting a list of rows, the way the system works it retrieves a list of link documents, this then makes sure those link documents reference something valid.
Description
Fixing an issue with corrupt relationship records referencing rows which don't exist, this is a temporary measure as these relationships should be cleaned up correctly but for now ignore any which reference rows which no longer exist.