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

Refs #26552 -- Added test for reloading the database with self-referential objects.

This commit is contained in:
Matthijs Kooijman
2019-12-02 01:16:32 +01:00
committed by Mariusz Felisiak
parent 1fe3e24264
commit 12e6f573ad
2 changed files with 28 additions and 1 deletions

View File

@@ -102,6 +102,11 @@ class ObjectReference(models.Model):
return str(self.obj_id)
class ObjectSelfReference(models.Model):
key = models.CharField(max_length=3, unique=True)
obj = models.ForeignKey('ObjectSelfReference', models.SET_NULL, null=True)
class RawData(models.Model):
raw_data = models.BinaryField()