Beispiel #1
0
    def create_backref(self, klass):
        if self.backref is None:
            return None

        relclass = ActiveMapperMeta.classes[self.classname]

        if klass.__name__ == self.classname:
            br_fkey = getattr(relclass.c, self.colname)
        else:
            br_fkey = None

        return create_backref(self.backref, remote_side=br_fkey)
 def create_backref(self, klass):
     if self.backref is None:
         return None
     
     relclass = ActiveMapperMeta.classes[self.classname]
     
     if klass.__name__ == self.classname:
         br_fkey = getattr(relclass.c, self.colname)
     else:
         br_fkey = None
     
     return create_backref(self.backref, remote_side=br_fkey)
Beispiel #3
0
    def create_backref(self, klass):
        if self.backref is None:
            return None

        relclass = ActiveMapperMeta.classes[self.classname]

        if klass.__name__ == self.classname:
            br_fkey = getattr(relclass.c, self.colname)
        else:
            br_fkey = None

        return create_backref(self.backref, foreignkey=br_fkey, uselist=False)
 def create_backref(self, klass):
     if self.backref is None:
         return None
     
     relclass = ActiveMapperMeta.classes[self.classname]
     
     if klass.__name__ == self.classname:
         br_fkey = getattr(relclass.c, self.colname)
     else:
         br_fkey = None
     
     return create_backref(self.backref, foreignkey=br_fkey, uselist=False)