Commit 13e4fe9
committed
Remove relationships when calling
Previously, when a topic was deleted, relationships from the topic and its descendants were not deleted.
This potentially introduces problems as any target relationships outside of the deleted topic graph would maintain `IncomingRelationships` back to the deleted topics. That means that those topics would persist in memory. It also means that any views displaying content from `IncomingRelationships` may provide links to resources that no longer exist.
To mitigate this, when `Delete()` is called, it now loops through all topics in the topic graph to be deleted, and removes all relationships from them. And, thanks to a new bug fix which ensures reciprocal `IncomingRelationships` are deleted when `RemoveTopic()` is called (f8b80ec), this fully addresses this issue.
In addition, a unit test has been introduced to validate this functionality.TopicRepositoryBase.Delete()
1 parent f8b80ec commit 13e4fe9
2 files changed
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
149 | 172 | | |
150 | 173 | | |
151 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
494 | 509 | | |
495 | 510 | | |
496 | 511 | | |
| |||
0 commit comments