Ejemplo n.º 1
0
 def _setup(self, cls, key, init_dict):
     prop = self.mapperprop or getattr(cls, self.name)
     prop = _deferred_relation(cls, prop)
     setattr(cls, key, self.prop)
     if init_dict is not None:
         init_dict[self.name] = prop
         init_dict[key] = _orm_synonym(self.name)
     else:
         setattr(cls, self.name, prop)
         setattr(cls, key, _orm_synonym(self.name))
Ejemplo n.º 2
0
 def decorate(fn):
     return _orm_synonym(name, map_column=map_column, descriptor=fn)
Ejemplo n.º 3
0
def declared_synonym(prop, name):
    """Deprecated.  Use synonym(name, descriptor=prop)."""
    return _orm_synonym(name, descriptor=prop)
Ejemplo n.º 4
0
 def decorate(fn):
     return _orm_synonym(name, map_column=map_column, descriptor=fn)
Ejemplo n.º 5
0
def declared_synonym(prop, name):
    """Deprecated.  Use synonym(name, descriptor=prop)."""
    return _orm_synonym(name, descriptor=prop)