Ticket #165 (closed defect: fixed)

Opened 7 years ago

Last modified 6 years ago

ORM does not cascade delete

Reported by: pavera@… Owned by: andrew
Priority: major Milestone: 0.7
Component: commands Version: 0.6-pre
Keywords: Cc:


Built a data migration which deletes some rows. The rows are referenced from other tables, and I get the following error:
psycopg2.IntegrityError?: update or delete on table "category" violates foreign key constraint "reward_category_category_id_fkey" on table "reward_category"
DETAIL: Key (id)=(10025) is still referenced from table "reward_category".

Change History

comment:1 Changed 7 years ago by pavera@…

The table reward_category is a M2M join table, this appears to be significant as andrew reports that it is working in trunk for regular foreign keys.

comment:2 Changed 7 years ago by andrew

  • Status changed from new to assigned
  • Version set to subversion
  • Milestone set to 0.6

comment:3 Changed 6 years ago by andrew

  • Milestone changed from 0.6 to 0.7

Bumping to 0.7.

comment:4 Changed 6 years ago by andrew

  • Status changed from assigned to closed
  • Resolution set to fixed

Fixed in [1d801ff38f8a].

Note: See TracTickets for help on using tickets.