The Django Book alludes to this, and maybe the comments there will
help you.
Go to http://www.djangobook.com/en/1.0/chapter05/
and search for this paragraph:

"Finally, note we haven’t explicitly defined a primary key in any of
these models. Unless you instruct it otherwise, Django automatically
gives every model an auto-incrementing integer primary key field
called id. Each Django model is required to have a single-column
primary key."

Jared

On Jan 9, 3:45 pm, Thorsten Sanders <thorsten.sand...@gmx.net> wrote:
> Hello,
>
> I am wondering if it is possible to still use the django orm without
> having a primary key at all, I currently got a table holding 61 million
> entries soon gonna expand to hold 600 million entries, that table never
> need to identify one entry alone its only to pull off statistics based
> on other fields, so far I  dropped the primary key index in the database
> and all works fine, but I know the orm always want a primary key, would
> it still work if I for example claim one of the fields which aren't
> unique as the primary key?
>
> Or is the only way to do it, use the cursor or even mysqldb directly?
>
> Greetings,
> Thorsten

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

Reply via email to