You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now delete the user shan, it should delete 1 entry from the test.Duty table, but it tries to delete two entries.
>> del(test.User & 'user_id="shan"')
ABOUT TO DELETE:
1 tuples from `test`.`user` (manual)
2 tuples from `test`.`duty` (manual)
Proceed to delete? (yes/no) >
If there is no renaming of foreign key, the delete was fine.
The text was updated successfully, but these errors were encountered:
@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.
The text was updated successfully, but these errors were encountered: