Beispiel #1
0
 def _make_mapping(self):
     reg = SimpleMappingRegistry()
     mp_opts = {
         ('parent', ): {
             WRITE_AS_LINK_OPTION: False,
             IGNORE_OPTION: False
         },
         ('nested_parent', ): {
             WRITE_AS_LINK_OPTION: False,
             IGNORE_OPTION: False
         },
         ('children', ): {
             WRITE_AS_LINK_OPTION: False,
             IGNORE_OPTION: False
         },
         ('children', 'children'): {
             WRITE_AS_LINK_OPTION: False,
             IGNORE_OPTION: False
         },
         ('children', 'no_backref_children'): {
             IGNORE_OPTION: True
         },
     }
     conf = RepresenterConfiguration(attribute_options=mp_opts)
     mp = reg.create_mapping(MyEntityMember, conf)
     reg.set_mapping(mp)
     return mp
Beispiel #2
0
 def _make_mapping(self):
     reg = SimpleMappingRegistry()
     mp_opts = {('parent',): self.PARENT_MAPPING_OPTIONS,
                ('children',): self.CHILDREN_MAPPING_OPTIONS,
                ('children', 'children'):
                             self.GRANDCHILDREN_MAPPING_OPTIONS,
                }
     conf = RepresenterConfiguration(attribute_options=mp_opts)
     mp = reg.create_mapping(MyEntityMember, conf)
     reg.set_mapping(mp)
     return mp
Beispiel #3
0
 def _make_mapping(self):
     reg = SimpleMappingRegistry()
     mp_opts = {
         ('parent', ): self.PARENT_MAPPING_OPTIONS,
         ('children', ): self.CHILDREN_MAPPING_OPTIONS,
         ('children', 'children'): self.GRANDCHILDREN_MAPPING_OPTIONS,
     }
     conf = RepresenterConfiguration(attribute_options=mp_opts)
     mp = reg.create_mapping(MyEntityMember, conf)
     reg.set_mapping(mp)
     return mp
 def _make_mapping(self):
     reg = SimpleMappingRegistry()
     mp_opts = {('parent',):{WRITE_AS_LINK_OPTION:False,
                             IGNORE_OPTION:False},
                ('nested_parent',):{WRITE_AS_LINK_OPTION:False,
                                    IGNORE_OPTION:False},
                ('children',):{WRITE_AS_LINK_OPTION:False,
                               IGNORE_OPTION:False},
                ('children', 'children'):{WRITE_AS_LINK_OPTION:False,
                                          IGNORE_OPTION:False},
                ('children', 'no_backref_children'):{IGNORE_OPTION:True},
                }
     conf = RepresenterConfiguration(attribute_options=mp_opts)
     mp = reg.create_mapping(MyEntityMember, conf)
     reg.set_mapping(mp)
     return mp