(self, uowcommit, states)
| 580 | # if the old parent wasn't deleted but child was moved. |
| 581 | |
| 582 | def process_saves(self, uowcommit, states): |
| 583 | should_null_fks = ( |
| 584 | not self.cascade.delete_orphan |
| 585 | and not self.passive_deletes == "all" |
| 586 | ) |
| 587 | |
| 588 | for state in states: |
| 589 | history = uowcommit.get_attribute_history( |
| 590 | state, self.key, attributes.PASSIVE_NO_INITIALIZE |
| 591 | ) |
| 592 | if history: |
| 593 | for child in history.added: |
| 594 | self._synchronize( |
| 595 | state, child, None, False, uowcommit, False |
| 596 | ) |
| 597 | if child is not None and self.post_update: |
| 598 | self._post_update(child, uowcommit, [state]) |
| 599 | |
| 600 | for child in history.deleted: |
| 601 | if ( |
| 602 | should_null_fks |
| 603 | and not self.cascade.delete_orphan |
| 604 | and not self.hasparent(child) |
| 605 | ): |
| 606 | self._synchronize( |
| 607 | state, child, None, True, uowcommit, False |
| 608 | ) |
| 609 | |
| 610 | if self._pks_changed(uowcommit, state): |
| 611 | for child in history.unchanged: |
| 612 | self._synchronize( |
| 613 | state, child, None, False, uowcommit, True |
| 614 | ) |
| 615 | |
| 616 | def _synchronize( |
| 617 | self, state, child, associationrow, clearkeys, uowcommit, pks_changed |
no test coverage detected