Commit 4da0d43
committed
Validate
The `Save()` method is obviously equipped to deal with `IsNew` topics. But it expects that the _parent_ of the current topic is saved. If not, it won't be able to save the child topic—or, if it were, it would be orphaned in the persistence store's hierarchy. Given that, I've added code to validate that the `Parent` is either `null` or `!IsNew`.
(Note: This doesn't affect recursive saves because they will save the parent before recursing through its children.)
This contributes to #77.IsNew of Parent on Save()
1 parent 8aacc5a commit 4da0d43
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
268 | 277 | | |
269 | 278 | | |
270 | 279 | | |
| |||
0 commit comments