Exemplo n.º 1
0
    def init_class_attribute(self):
        self.is_class_level = True

        strategies._register_attribute(
            self,
            useobject=True,
            impl_class=DynamicAttributeImpl,
            target_mapper=self.parent_property.mapper,
            order_by=self.parent_property.order_by,
            query_class=self.parent_property.query_class)
Exemplo n.º 2
0
    def init_class_attribute(self, mapper):
        self.is_class_level = True

        strategies._register_attribute(self,
            mapper,
            useobject=True,
            impl_class=DynamicAttributeImpl,
            target_mapper=self.parent_property.mapper,
            order_by=self.parent_property.order_by,
            query_class=self.parent_property.query_class
        )
Exemplo n.º 3
0
 def init_class_attribute(self, mapper):
     self.is_class_level = True
     if not self.uselist:
         util.warn(
                 "On relationship %s, 'dynamic' loaders cannot be used with "
                 "many-to-one/one-to-one relationships and/or "
                 "uselist=False." % self.parent_property)
     strategies._register_attribute(self,
         mapper,
         useobject=True,
         impl_class=DynamicAttributeImpl,
         target_mapper=self.parent_property.mapper,
         order_by=self.parent_property.order_by,
         query_class=self.parent_property.query_class
     )
Exemplo n.º 4
0
 def init_class_attribute(self, mapper):
     self.is_class_level = True
     if not self.uselist:
         util.warn(
             "On relationship %s, 'dynamic' loaders cannot be used with "
             "many-to-one/one-to-one relationships and/or "
             "uselist=False." % self.parent_property)
     strategies._register_attribute(
         self,
         mapper,
         useobject=True,
         impl_class=DynamicAttributeImpl,
         target_mapper=self.parent_property.mapper,
         order_by=self.parent_property.order_by,
         query_class=self.parent_property.query_class)