Opened 15 years ago

Closed 15 years ago

Last modified 6 years ago

#9804 closed (fixed)

sqlflush fails for ManyToMany with inherited intermediary

Reported by: jdimov Owned by: nobody
Component: Database layer (models, ORM) Version: 1.0
Severity: Keywords: ManyToMany, sqlflush, sequence_list
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

There's a bug in the sequence_list method of django.db.backends.BaseDatabaseIntrospection, but I don't know how to fix it. It has to do with Many-to-Many relationships through intermediary models, where the intermediary model itself is inherited from a non-abstract base model. In this case, the sequnece_list contains id sequence counter which do not (and should not) actually exist, because the model uses the base model's id counter.

The result of all this is that the manage.py sqlflush command fails, and I can't run my tests.

Change History (5)

comment:1 by Jacob, 15 years ago

milestone: 1.1
Triage Stage: UnreviewedAccepted

comment:2 by Russell Keith-Magee, 15 years ago

Resolution: fixed
Status: newclosed

(In [10552]) Fixed #9804 -- Corrected the introspection of sequence names. This was causing problems when flushing tables that had many-to-many relations through an inherited table. Thanks to jdimov for the report.

comment:3 by Russell Keith-Magee, 15 years ago

(In [10553]) [1.0.X] Fixed #9804 -- Corrected the introspection of sequence names. This was causing problems when flushing tables that had many-to-many relations through an inherited table. Thanks to jdimov for the report.

Merge of r10552 from trunk.

comment:4 by Jacob, 13 years ago

milestone: 1.1

Milestone 1.1 deleted

comment:5 by Tim Graham <timograham@…>, 6 years ago

In 4d98b9d:

Refs #9804 -- Fixed test for sequence reset of M2M with inherited through model.

Note: See TracTickets for help on using tickets.
Back to Top