-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug with del() #379
Comments
Do we have any updates on this ? |
Hi @Alvalunasan, thanks for the report. After discussion with @guzman-raphael, the team will be able to return to this issue within 2-3 weeks. |
Just commenting here since this hasn't had any traction in a while. I believe this issue can be resolved with an edit to a single line of code, as in 938626c. This probably arose in the most recent release because of weak typing in MATLAB and testing against a table with only one foreign key. I haven't checked that the rest of the logic there is sound, but if you read the comments it's obvious this is what they were going for. So as a workaround before this gets formally addressed you should just be able to edit that line in your datajoint installation. |
Possible fix for datajoint#379.
Example of an incorrect deletion on version 3.4.2
testtech_del1 is a reference only for record 2 {'2021-03-11'}
We try to delete that user it tries to delete all records from duty_roaster :
|
Thanks @Alvalunasan. I will adapt your example for a test case. Schema diagramTable definitionslab.User
lab.Duty
Insert table entries
Table entries
Test case 1 with DataJoint MATLAB 3.4.2VersionsMATLAB R2020b
Test case 2 with DataJoint MATLAB 3.4.3VersionsMATLAB R2020b
|
When attempting to delete I get the following error:
Error in dj.Relvar/del (line 95)
if ~fks.aliased
'subject_id' is the primary key for table EXP2.Session, and this always worked before. I noticed it after upgrading to DataJoint version 3.4.3.
del() with few other tables that are under EXP2.Session with the same key that I tested worked fine
MATLAB 2018b
DataJoint version 3.4.3
The text was updated successfully, but these errors were encountered: