Commit 704c8de
committed
Set default value of
Originally, `ITopicRepository.Delete()`'s `isRecursive` parameter was set to a default value of `false`, as it only makes sense to do a recursive delete if the user opts into it. Unfortunately, however, there was a long-standing bug where `Delete()` failed to validate whether or not there were children, and thus would _always_ do a recursive delete, regardless of whether or not `isRecursive` was set. Whoops.
This was fixed in OnTopic 4.5.0 (a0cc21c). In order to avoid breaking backward compatibility, however, the default was changed to `true` so that it continued to operate as it had before (1773113); otherwise this would have been a breaking change.
Having the default be more aggressive doesn't make much sense; users should opt in to the more invasive mode. As such, now that we're preparing for a major release, I'm reverting this back to its original default of `false`. Now, if a user attempts to `Delete(Topic)` without explicitly defining `isRecursive`, and that topic has children, an exception will be thrown, and the topic will not be deleted.ITopicRepository.Delete(isRecursive) to false
1 parent e6bfe58 commit 704c8de
File tree
4 files changed
+5
-5
lines changed- OnTopic.Data.Sql
- OnTopic.TestDoubles
- OnTopic/Repositories
4 files changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
549 | | - | |
| 549 | + | |
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
| 150 | + | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
0 commit comments