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=True' in the model. A
simple model with a custom primary key:

class Employee(models.Model):
    employee_code = models.CharField(max_length=10, primary_key=True)
    first_name = models.CharField(max_length=20)
    last_name = models.CharField(max_length=20)

I hope this helps.

--Jon

On 8/14/07, Catriona <[EMAIL PROTECTED]> wrote:
>
> 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
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to