* ui_ux: => 0
* type: => Uncategorized
* severity: => Normal
* easy: => 0
Comment:
Know this is closed, but again just to provide perspective.
I could really have used this feature actually. I have a project with
existing data where they use as an ID an auto-increment (just like
Django's default id). However, they also use a different no_header.
Sometimes they create revision on their object, so basically their db ends
up looking like this:
id no_header suite
1 1 0
2 2 0
3 1 1
4 3 0
......
So essentially, the no_header is an auto-increment, that only increments
on the creation of new objects (with suite=0). If an object undergo some
specific operation, then its no_header remains the same, but suite += 1.
Which means that the no_header ends up running "behind" the id field, but
it still needs to be an auto-increment. Of course I can override save() &
do all that business there, but it would still be so much simpler to just
have 2 auto-increment fields. IMO this is a conception flaw in the
database backends - e.g there isn't an obvious reason to limit auto
increment to a single field, if a separate attributes allows specifying
what is a primary key. But I digress. Mostly wanted to illustrate a use
case.
--
Ticket URL: <https://code.djangoproject.com/ticket/8576#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.