Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#7565 closed (fixed)

Fixture problem with child models

Reported by: casey@… Owned by: Malcolm Tredinnick
Component: Uncategorized Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

There seems to be a problem importing fixtures for child models. Supposing I have a model myapp.MyGroup that inherits from auth.Group, and I have a fixture that includes MyGroup data, I receive the following error:

psycopg2.ProgrammingError: column "id" does not exist at character 54

generated from this SQL:

SELECT setval('"myapp_mygroup_id_seq"', coalesce(max("id"), 1), max("id") IS NOT null) FROM "myapp_mygroup";

As far as I can tell, it appears that it is attempting to updating the sequence for the pk of the child model (for which there is none) using the "myapp.mygroup.id" column (which doesn't exist).

Change History (3)

comment:1 by Malcolm Tredinnick, 16 years ago

Owner: changed from nobody to Malcolm Tredinnick

comment:2 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: newclosed

(In [7789]) Fixed #7565 -- Fixed a problem with PostgreSQL sequence resetting in loaddata.

comment:3 by Erin Kelly, 16 years ago

(In [7831]) Refs #7565. Fixed Oracle sequence resetting on child models.

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