Hi Ian
Sorry for taking a while to get back to you but I've been away.
Thanks for your advice. I will log a bug.
I have also found a couple of other issues and will report those as
well.
Regards
Catriona
On Aug 16, 3:44 pm, Ian <[EMAIL PROTECTED]> wrote:
> On Aug 15, 9:43 pm, Catriona <[EMAI
On Aug 15, 9:43 pm, Catriona <[EMAIL PROTECTED]> wrote:
> Hi Ian
>
> Sorry I wasn't really clear in what I want to achieve. I really just
> want to call my primary key, in this case, employee_id and have it
> incremented automatically.
Sorry I misunderstood you. The code you tried appears to be
Hi Ian
Sorry I wasn't really clear in what I want to achieve. I really just
want to call my primary key, in this case, employee_id and have it
incremented automatically.
I tried the following:
from django.db import models
class Employee(models.Model):
employee_id = models.AutoField(max_len
Catriona,
Only AutoFields are auto-incrementing in Django. If you want to use a
custom primary key that isn't an AutoField, you will need to populate
the primary key yourself (or else create a custom trigger for it),
just as you would for any other column that is both NOT NULL and
UNIQUE. This
Hi Jon
Thanks for your reply. I read the article but with Oracle, a sequence
and trigger needs to be created for autogenerated primary keys. If I
try the code that you gave me, neither the sequence nor trigger are
created - ie
C:\DjangoTraining\PK>python manage.py sql test
CREATE TABLE "TEST_EMP
Catriona,
I have very little Oracle experience, but also no reason to think that
setting a custom primary key would be different from any other
database backend.
The documentation is here:
http://www.djangoproject.com/documentation/models/custom_pk/
The primary key is set by using 'primary_key=
Hello
I am a beginning Django user and would appreciate help on the
following issue.
How do I specify a custom primary key in my model when using Oracle
10g
I am using the lastest Django version from svn.
Thanks for your help
Catriona
--~--~-~--~~~---~--~~
Yo
7 matches
Mail list logo