Skip to content

Commit

Permalink
add fixme
Browse files Browse the repository at this point in the history
  • Loading branch information
abretaud committed Aug 30, 2019
1 parent 5739201 commit 1698dc4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions chado/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ class Db(Base):
# Inspired from https://bitbucket.org/zzzeek/sqlalchemy/wiki/UsageRecipes/ManyToManyOrphan
# In chado, a feature can be part of multiple analysis, using the analysisfeature table
# With the following code, when we delete an analysis, it also deletes all features that were only part of this single analysis
# FIXME This is slow for analysis with many features, it runs 1 delete query per feature
@event.listens_for(self.session, 'after_flush')
def delete_feature_orphans(session, ctx):
# List all features that were attached to a deleted analysis
Expand Down

0 comments on commit 1698dc4

Please sign in to comment.