@@ -47,7 +47,7 @@ class Role(SurrogatePK, Model):
4747 id = Column (Integer (), primary_key = True )
4848 name = Column (String (80 ), unique = True )
4949 description = Column (String (255 ))
50- members = relationship ('User' , secondary = 'user_roles' )
50+ users_ = relationship ('User' , secondary = 'user_roles' )
5151
5252 @classmethod
5353 def get_by_name (cls , name ):
@@ -62,7 +62,7 @@ class Group(SurrogatePK, Model):
6262 id = Column (Integer (), primary_key = True )
6363 name = Column (String (80 ), unique = True )
6464 members = relationship ('User' , secondary = 'user_groups' )
65- cellTypeWorksheets = relationship ('CellTypeWorksheet' , secondary = 'worksheet_groups' )
65+ cell_type_worksheets = relationship ('CellTypeWorksheet' , secondary = 'worksheet_groups' )
6666
6767 @classmethod
6868 def get_by_name (cls , name ):
@@ -127,6 +127,12 @@ class CellTypeWorksheet(SurrogatePK, Model):
127127 expression_id = Column (Integer (), ForeignKey ('userexpression.id' ))
128128 __table_args__ = (UniqueConstraint ('name' , 'user_id' , name = "ws:user" ),)
129129
130+ user_ = relationship (
131+ 'User' ,
132+ backref = backref ('worksheets' , lazy = 'dynamic' ))
133+ user_expression = relationship (
134+ 'UserExpression' ,
135+ backref = backref ('worksheets' , lazy = 'dynamic' ))
130136 groups = relationship (
131137 'Group' ,
132138 secondary = "worksheet_groups" ,
@@ -201,6 +207,10 @@ class ExpDimReduct(SurrogatePK, Model):
201207 place = Column (String , nullable = False )
202208 expression_id = Column (Integer , ForeignKey ("userexpression.id" ), nullable = False )
203209
210+ user_expression = relationship (
211+ 'UserExpression' ,
212+ backref = backref ('expDimReducts' , lazy = 'dynamic' ))
213+
204214 @classmethod
205215 def get_by_expression (cls , expression ):
206216 return cls .query .filter (cls .expression_id == expression .id ).first ()
@@ -216,6 +226,10 @@ class ExpCluster(SurrogatePK, Model):
216226 id = Column (Integer (), primary_key = True )
217227 expression_id = Column (Integer , ForeignKey ("userexpression.id" ), nullable = False )
218228
229+ user_expression = relationship (
230+ 'UserExpression' ,
231+ backref = backref ('expClusters' , lazy = 'dynamic' ))
232+
219233 @classmethod
220234 def get_cluster (cls , expression ):
221235 return cls .query .filter (cls .expression_id == expression .id ).one ()
@@ -229,6 +243,10 @@ class ClusterGeneTable(SurrogatePK, Model):
229243 place = Column (String , nullable = False )
230244 cluster_id = Column (Integer , ForeignKey ("expcluster.id" ), nullable = False )
231245
246+ exp_cluster = relationship (
247+ 'ExpCluster' ,
248+ backref = backref ('cluster_gene_table' , lazy = 'dynamic' ))
249+
232250 @classmethod
233251 def get_table (cls , cluster ):
234252 return cls .query .filter (cls .cluster_id == cluster .id ).first ()
0 commit comments