diff options
| author | Daniel Hillier <daniel.hillier@gmail.com> | 2020-08-08 15:17:36 +1000 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-08-11 11:55:10 +0200 |
| commit | 60626162f76f26d32a38d18151700cb041201fb3 (patch) | |
| tree | cb1b1cfc019734f6048b2e069e3667b11ce9116e /tests/select_for_update/models.py | |
| parent | 0aeb802cf054cb369646c871b53c93a83c1fa58a (diff) | |
Fixed #31866 -- Fixed locking proxy models in QuerySet.select_for_update(of=()).
Diffstat (limited to 'tests/select_for_update/models.py')
| -rw-r--r-- | tests/select_for_update/models.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/select_for_update/models.py b/tests/select_for_update/models.py index 305e8cac49..0a6396bc70 100644 --- a/tests/select_for_update/models.py +++ b/tests/select_for_update/models.py @@ -23,6 +23,20 @@ class EUCity(models.Model): country = models.ForeignKey(EUCountry, models.CASCADE) +class CountryProxy(Country): + class Meta: + proxy = True + + +class CountryProxyProxy(CountryProxy): + class Meta: + proxy = True + + +class CityCountryProxy(models.Model): + country = models.ForeignKey(CountryProxyProxy, models.CASCADE) + + class Person(models.Model): name = models.CharField(max_length=30) born = models.ForeignKey(City, models.CASCADE, related_name='+') |
