Commit 85c386f
committed
Prevent
A `Topic` instance that hasn't been saved can _only_ be dirty, by definition. As such, any efforts to mark a collection associated with a new `Topic` as clean, or to modify the collection with an `!markDirty` parameter should not be honored.
There's no need to check this condition from `IsDirty`; instead, we can just make sure it's checked during any entry points, such as e.g. `MarkClean()`, `SetValue()` or `SetTopic()`, `InsertItem()`, and/or `SetItem()`.MarkClean() or IsClean() if Topic.IsNew
1 parent b01216e commit 85c386f
2 files changed
Lines changed: 41 additions & 8 deletions
File tree
- OnTopic
- Associations
- Collections/Specialized
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
| 190 | + | |
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
249 | 254 | | |
250 | 255 | | |
251 | | - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
252 | 262 | | |
253 | 263 | | |
254 | 264 | | |
Lines changed: 28 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
149 | 152 | | |
150 | 153 | | |
151 | 154 | | |
| |||
169 | 172 | | |
170 | 173 | | |
171 | 174 | | |
172 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
173 | 179 | | |
174 | 180 | | |
175 | 181 | | |
| |||
444 | 450 | | |
445 | 451 | | |
446 | 452 | | |
447 | | - | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
448 | 457 | | |
449 | 458 | | |
450 | 459 | | |
| |||
474 | 483 | | |
475 | 484 | | |
476 | 485 | | |
477 | | - | |
| 486 | + | |
478 | 487 | | |
479 | 488 | | |
480 | 489 | | |
| |||
534 | 543 | | |
535 | 544 | | |
536 | 545 | | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
537 | 551 | | |
538 | 552 | | |
539 | 553 | | |
| |||
567 | 581 | | |
568 | 582 | | |
569 | 583 | | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
570 | 589 | | |
571 | 590 | | |
572 | 591 | | |
| |||
588 | 607 | | |
589 | 608 | | |
590 | 609 | | |
591 | | - | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
592 | 613 | | |
593 | 614 | | |
594 | 615 | | |
| |||
604 | 625 | | |
605 | 626 | | |
606 | 627 | | |
607 | | - | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
608 | 631 | | |
609 | 632 | | |
610 | 633 | | |
| |||
0 commit comments