コード例 #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)
コード例 #2
0
ファイル: dynamic.py プロジェクト: dreamwave/rad
    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
        )
コード例 #3
0
ファイル: dynamic.py プロジェクト: ArcTanSusan/ratings
 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
     )
コード例 #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)