Commit 6da3fa4
committed
Bypass unsaved relationships (bug fix)
In a recent commit (d0a96d8), I updated `PersistRelationships()` to bypass unsaved relationships. Except, that's not actually what I did. That code had an error in it, as it was evaluating the _source_ topic, not the _target_ topic. Whoops. This resolves that issue.
See d0a96d8 for an explanation on the objective for this change. The short of it is that we shouldn't save references to targets that don't have a `TopicId` as that will generate a FKC exception in the database. This only happens in rare scenarios, but one notable example is when recursively saving entire topic in-memory topic graphs, as happens when importing topics.1 parent 682d328 commit 6da3fa4
1 file changed
Lines changed: 1 addition & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | 588 | | |
594 | 589 | | |
595 | 590 | | |
596 | 591 | | |
597 | | - | |
| 592 | + | |
598 | 593 | | |
599 | 594 | | |
600 | 595 | | |
| |||
0 commit comments