Beispiel #1
0
    class MapperBase(Mapper):

        __type__ = TestType

        id = Integer()
        name = String()
        users = Collection(Nested(UserMapper, allow_create=True))
Beispiel #2
0
    class MapperBase(Mapper):

        __type__ = TestType

        id = Integer()
        name = String()
        user = Nested(UserMapper, null_default={})
Beispiel #3
0
    class UserMapper(Mapper):

        __type__ = dict

        id = String(required=True, read_only=True)
        name = String()
        company = Nested(CompanyMapper)
Beispiel #4
0
    class MapperBase(Mapper):

        __type__ = TestType

        id = Integer()
        name = String()
        user = Nested(UserMapper, role='private')

        __roles__ = {'private': whitelist('name', 'user')}
Beispiel #5
0
    class MapperBase(Mapper):

        __type__ = TestType

        id = Integer()
        name = String()
        user = Nested(UserMapper, role='private')

        __roles__ = {
            'private': [
                'id',
            ]
        }