sql sequence reset ignores through meta-data for ManyToMany relations
|Reported by:||phaesler||Owned by:||nobody|
|Component:||Core (Management commands)||Version:||1.0|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The sql sequence reset code in django.core.management ignores any "through" table meta-data on ManyToMany relations. In particular, it assumes that the primary key column of the many-to-many join table is called "id", even if a "through" Model is given that declares a primary key column with a different name.
This affects at least the postgresql and oracle backends:
Both explicitly set the primary key column name to "id".