Refs #28010 -- Allowed reverse related fields in SELECT FOR UPDATE .. OF.

Thanks Adam Chidlow for polishing the patch.
This commit is contained in:
Ran Benita 2017-10-17 11:28:00 +08:00 committed by Tim Graham
parent 56b364bacc
commit 03049fb8d9
5 changed files with 61 additions and 6 deletions

View file

@ -14,3 +14,7 @@ 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='+')
class PersonProfile(models.Model):
person = models.OneToOneField(Person, models.CASCADE, related_name='profile')