mirror of
https://github.com/django/django.git
synced 2025-11-25 21:22:14 +00:00
Refs #26552 -- Added test for reloading the database with self-referential objects.
This commit is contained in:
parent
1fe3e24264
commit
12e6f573ad
2 changed files with 28 additions and 1 deletions
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue