1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Fixed #34226 -- Fixed QuerySet.select_related() with multiple FilteredRelations to the OneToOneField.

This commit is contained in:
朱穆穆
2022-12-26 14:13:44 +08:00
committed by Mariusz Felisiak
parent 48b6108e50
commit bbeeb45161
3 changed files with 22 additions and 2 deletions

View File

@@ -24,3 +24,6 @@ class Pool(models.Model):
class PoolStyle(models.Model):
name = models.CharField(max_length=30)
pool = models.OneToOneField(Pool, models.CASCADE)
another_pool = models.OneToOneField(
Pool, models.CASCADE, null=True, related_name="another_style"
)