mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #30382 -- Allowed specifying parent classes in force_insert of Model.save().
This commit is contained in:
committed by
Mariusz Felisiak
parent
601ffb0da3
commit
a40b0103bc
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user