summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2006-06-15 11:28:28 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2006-06-15 11:28:28 +0000
commit28e643743f595abfab3ae8f0c40363b709defb86 (patch)
treed72ca8ab002d79b1a1a4e177b60437fefe63812c /tests
parent8938d5eeb32bd246aacab22ddbd0484165de7a94 (diff)
Fixed #2164 -- Create correct SQL when pk column name is not the same as the
attribute name. Thanks, Russell Cloran. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3130 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/modeltests/custom_pk/models.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/modeltests/custom_pk/models.py b/tests/modeltests/custom_pk/models.py
index 6193852adf..f7b790ca21 100644
--- a/tests/modeltests/custom_pk/models.py
+++ b/tests/modeltests/custom_pk/models.py
@@ -8,7 +8,8 @@ this behavior by explicitly adding ``primary_key=True`` to a field.
from django.db import models
class Employee(models.Model):
- employee_code = models.CharField(maxlength=10, primary_key=True)
+ employee_code = models.CharField(maxlength=10, primary_key=True,
+ db_column = 'code')
first_name = models.CharField(maxlength=20)
last_name = models.CharField(maxlength=20)
class Meta: