dynamic relation prevents delete cascade from loading in existing items

Issue #895 resolved
Mike Bayer repo owner created an issue

the get_history(passive=False) needs to load in the full list of child elements and assign it to CollectionHistory.unchanged_items, so that a delete of the lead object detaches / cascades to the child items.

also verify that this is working OK with the recent lazy load change.

Comments (8)

  1. Former user Account Deleted

    Doesn't work in 0.4.3 on Firebird. Attached testcase gives a "violation of FOREIGN KEY constraint".

  2. Former user Account Deleted

    Replying to guest:

    Doesn't work in 0.4.3 on Firebird. Attached testcase gives a "violation of FOREIGN KEY constraint". Neither in 0.4.4.

  3. Mike Bayer reporter

    confirmed the bug with postgres and fixed in 190436e58df15a994fd57699e00bbfdbcc0e1848, which is most likely the same issue experienced in firebird. CHANGES message for 0.4.2 was incorrect, "delete" cascade was not implemented, only "null out foreign keys" behavior for a non-cascaded delete.

    thanks for locating the correct ticket and test case !

  4. Log in to comment