Closed shenshan closed 3 years ago
@shenshan Thanks for the report. This one is a pre-existing issue and a bit more involved to patch. It is at the top of the current priority and will keep you posted on any updates. There is a comment here in the source about this specifically too.
Bug Report
Description
del deletes some unexpected entries from downstream tables when the foreign keys are renamed.
Reproducibility
dj version 3.4.2 maybe also in earlier versions. This was an old bug.
To reproduce, create the following tables: +test/User.m
+test/Duty.m
Then insert some data into the tables.
Now delete the user
shan
, it should delete 1 entry from the test.Duty table, but it tries to delete two entries.If there is no renaming of foreign key, the delete was fine.