Tom Tobin wrote:
> On 5/9/06, gabor <[EMAIL PROTECTED]> wrote:
>> are there any scenarios when it's not a good idea to have [Slugs] as
>> primary keys? (except some hypothetical situations)
> 
> The short answer: it's always a *bad* idea.
> 
> The slightly longer answer: It's generally a bad idea to have your
> primary key be a field with any sort of external meaning; that's why
> an arbitrary, autoincremented serial/integer field is typically used. 
> If you use a slug (for example), your data integrity is hosed the
> moment your slug changes (perhaps because you changed the title); all
> foreign references to that object will become invalid.
> 

i see now. thanks for the info.

gabor

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to