diff options
| author | Ran Benita <ran234@gmail.com> | 2017-10-17 11:28:00 +0800 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-10-28 20:33:42 -0400 |
| commit | 03049fb8d96ccd1f1ed0285486103542de42faba (patch) | |
| tree | 243c0b4cc9b622a47ce7a665d36d8b4ab4973a0d /tests/select_for_update/models.py | |
| parent | 56b364bacca0d6a6cd8fbcd93aeb49f3ad46e58c (diff) | |
Refs #28010 -- Allowed reverse related fields in SELECT FOR UPDATE .. OF.
Thanks Adam Chidlow for polishing the patch.
Diffstat (limited to 'tests/select_for_update/models.py')
| -rw-r--r-- | tests/select_for_update/models.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/select_for_update/models.py b/tests/select_for_update/models.py index b04ed31b00..b8154af3df 100644 --- a/tests/select_for_update/models.py +++ b/tests/select_for_update/models.py @@ -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') |
