diff options
| author | Ian Kelly <ian.g.kelly@gmail.com> | 2007-09-14 18:12:36 +0000 |
|---|---|---|
| committer | Ian Kelly <ian.g.kelly@gmail.com> | 2007-09-14 18:12:36 +0000 |
| commit | 93f60163e87036dac3dbfbbe09bdd7c7c195dd67 (patch) | |
| tree | 2596452fcadceb2e184a51b6524e0c28408950df /django/db/models | |
| parent | 933cda3749865b0c776a21b39076c500ddcbe12f (diff) | |
Fixed #5218: Made Oracle create autoinc triggers using the correct name
of the AutoField column rather than always assume "ID".
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6195 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/models')
| -rw-r--r-- | django/db/models/fields/__init__.py | 1 | ||||
| -rw-r--r-- | django/db/models/options.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py index 3792a30a88..34d998c219 100644 --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -433,6 +433,7 @@ class AutoField(Field): assert not cls._meta.has_auto_field, "A model can't have more than one AutoField." super(AutoField, self).contribute_to_class(cls, name) cls._meta.has_auto_field = True + cls._meta.auto_field = self def formfield(self, **kwargs): return None diff --git a/django/db/models/options.py b/django/db/models/options.py index ad813ae0f7..502cbc4a65 100644 --- a/django/db/models/options.py +++ b/django/db/models/options.py @@ -33,7 +33,7 @@ class Options(object): self.admin = None self.meta = meta self.pk = None - self.has_auto_field = False + self.has_auto_field, self.auto_field = False, None self.one_to_one_field = None self.parents = [] |
