>
>
> Are you saying that Django adds the "ON UPDATE CASCADE" to the database
> definition? I've never noticed it doing this (unless you're using a
> patch that I submitted that does this for Foreign Keys where tell it to
> do so).
>
> Or, are you saying that Django emulates this behavior? I don't think
> that's correct either (see the URL I reference below).
>

I was under the assumption it was doing this as it was creating foreign key
constraints, I might be wrong.

> Yes.  We are a scientific institution, and I create a samples
> database.  Frequently a sample gets a new name, however, the old
> name(s) must be kept as aliases.

> For the aliases, I probably will use a second table with many-to-one
> relationship.

I don't think it's best practice to give meaningful names to primary key
field in Django, you should probably have field name and let Django
auto-create a id field. The relationship table is a good idea but if you
want to alias different models, you could take a look at generic
relationship and "tag" your samples with the old names.

--~--~---------~--~----~------------~-------~--~----~
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