@@ -136,20 +136,21 @@ class Tripal_analysis_blast(Base):
136136 Base .prepare (self ._engine , reflect = True , schema = self .dbschema )
137137 if reflect_tripal_tables and self .dbschema != "public" :
138138 Base .prepare (self ._engine , reflect = True , schema = 'public' )
139+
139140 # Check for schema name instead of hardcoding?
140141 self .model = Base .classes
141142 self .model .blast_hit_data = Blast_hit_data
142143 self .model .tripal_analysis_blast = Tripal_analysis_blast
143144
144145 # ambiguous relationships to same table
145- self .model .feature_relationship .subject = relationship (" feature" , foreign_keys = [self .model .feature_relationship .subject_id ], back_populates = "subject_in_relationships" )
146- self .model .feature .subject_in_relationships = relationship (" feature_relationship" , foreign_keys = [self .model .feature_relationship .subject_id ])
147- self .model .feature_relationship .object = relationship (" feature" , foreign_keys = [self .model .feature_relationship .object_id ], back_populates = "object_in_relationships" )
148- self .model .feature .object_in_relationships = relationship (" feature_relationship" , foreign_keys = [self .model .feature_relationship .object_id ])
149-
150- self .model .featureloc .feature = relationship (" feature" , foreign_keys = [self .model .featureloc .feature_id ], back_populates = "featureloc_collection" )
151- self .model .feature .featureloc_collection = relationship (" featureloc" , foreign_keys = [self .model .featureloc .feature_id ], back_populates = "feature" )
152- self .model .featureloc .srcfeature = relationship (" feature" , foreign_keys = [self .model .featureloc .srcfeature_id ])
146+ self .model .feature_relationship .subject = relationship (self . model . feature , foreign_keys = [self .model .feature_relationship .subject_id ], back_populates = "subject_in_relationships" )
147+ self .model .feature .subject_in_relationships = relationship (self . model . feature_relationship , foreign_keys = [self .model .feature_relationship .subject_id ])
148+ self .model .feature_relationship .object = relationship (self . model . feature , foreign_keys = [self .model .feature_relationship .object_id ], back_populates = "object_in_relationships" )
149+ self .model .feature .object_in_relationships = relationship (self . model . feature_relationship , foreign_keys = [self .model .feature_relationship .object_id ])
150+
151+ self .model .featureloc .feature = relationship (self . model . feature , foreign_keys = [self .model .featureloc .feature_id ], back_populates = "featureloc_collection" )
152+ self .model .feature .featureloc_collection = relationship (self . model . featureloc , foreign_keys = [self .model .featureloc .feature_id ], back_populates = "feature" )
153+ self .model .featureloc .srcfeature = relationship (self . model . feature , foreign_keys = [self .model .featureloc .srcfeature_id ])
153154
154155 def _reflect_tables_subset (self ):
155156
0 commit comments