Skip to content
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

Deleting a SEGF relationship appears to delete the connected SE #563

Open
fiendish opened this issue Dec 24, 2020 · 3 comments
Open

Deleting a SEGF relationship appears to delete the connected SE #563

fiendish opened this issue Dec 24, 2020 · 3 comments
Labels
question Further information is requested

Comments

@fiendish
Copy link
Contributor

That's unexpected. At least it doesn't also delete the GF, which is good.

@znatty22
Copy link
Member

znatty22 commented Jan 5, 2021

@fiendish It doesn't actually delete the SE but it will appear like that (when you query /sequencing-experiments?study_id=blah) because once you delete the SE-GF, you've broken the join path between the SE and the study. If you were to add back in the SE-GF, I bet your SE will still be there

@fiendish
Copy link
Contributor Author

fiendish commented Jan 5, 2021

Oops.

I think this means there are dangling SEs now.

@znatty22
Copy link
Member

Ah you know what @fiendish, your original issue may be correct. When you delete SEGF records, it does not cascade delete the SE. However, after the delete operation it does check for dangling SE and it will delete those.

The code for that is here:

def delete_orphans(mapper, connection, state):

Is this the desired behavior or do we want those SEs to stick around even if we delete their links to the participant tree?

@znatty22 znatty22 reopened this Feb 11, 2021
@znatty22 znatty22 added the question Further information is requested label May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants