1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #28010 -- Added FOR UPDATE OF support to QuerySet.select_for_update().

This commit is contained in:
Ran Benita
2017-06-29 23:00:15 +03:00
committed by Tim Graham
parent 2d18c60fbb
commit b9f7dce84b
12 changed files with 206 additions and 23 deletions

View File

@@ -1,5 +1,16 @@
from django.db import models
class Country(models.Model):
name = models.CharField(max_length=30)
class City(models.Model):
name = models.CharField(max_length=30)
country = models.ForeignKey(Country, models.CASCADE)
class Person(models.Model):
name = models.CharField(max_length=30)
born = models.ForeignKey(City, models.CASCADE, related_name='+')
died = models.ForeignKey(City, models.CASCADE, related_name='+')