1
0
mirror of https://github.com/django/django.git synced 2024-12-28 12:06:22 +00:00
django/tests/bulk_create/models.py
Tim Graham 7a5b7e35bf Fixed #22705 -- Fixed QuerySet.bulk_create() on models without any fields on Oracle.
Fixed on other backends by 134ca4d438.

Thanks Mariusz Felisiak for the solution.
2015-10-09 14:16:06 -04:00

54 lines
887 B
Python

from django.db import models
class Country(models.Model):
name = models.CharField(max_length=255)
iso_two_letter = models.CharField(max_length=2)
class ProxyCountry(Country):
class Meta:
proxy = True
class ProxyProxyCountry(ProxyCountry):
class Meta:
proxy = True
class ProxyMultiCountry(ProxyCountry):
pass
class ProxyMultiProxyCountry(ProxyMultiCountry):
class Meta:
proxy = True
class Place(models.Model):
name = models.CharField(max_length=100)
class Meta:
abstract = True
class Restaurant(Place):
pass
class Pizzeria(Restaurant):
pass
class State(models.Model):
two_letter_code = models.CharField(max_length=2, primary_key=True)
class TwoFields(models.Model):
f1 = models.IntegerField(unique=True)
f2 = models.IntegerField(unique=True)
class NoFields(models.Model):
pass