diff options
| author | Akash Kumar Sen <Akash-Kumar-Sen@users.noreply.github.com> | 2023-06-22 18:23:11 +0530 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-06-29 21:52:52 +0200 |
| commit | a40b0103bccb8216c944188d329d8ea5eceb7e92 (patch) | |
| tree | a08a0def2a0d448515f6b40409ab09e6fc129c0f /tests/force_insert_update/models.py | |
| parent | 601ffb0da3a8c3900164b356c585650c00d238b0 (diff) | |
Fixed #30382 -- Allowed specifying parent classes in force_insert of Model.save().
Diffstat (limited to 'tests/force_insert_update/models.py')
| -rw-r--r-- | tests/force_insert_update/models.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/force_insert_update/models.py b/tests/force_insert_update/models.py index 586be12f13..b95b197454 100644 --- a/tests/force_insert_update/models.py +++ b/tests/force_insert_update/models.py @@ -30,3 +30,13 @@ class SubSubCounter(SubCounter): class WithCustomPK(models.Model): name = models.IntegerField(primary_key=True) value = models.IntegerField() + + +class OtherSubCounter(Counter): + other_counter_ptr = models.OneToOneField( + Counter, primary_key=True, parent_link=True, on_delete=models.CASCADE + ) + + +class DiamondSubSubCounter(SubCounter, OtherSubCounter): + pass |
