Skip to content

Add support for List [list of references] type #98

@rbw

Description

@rbw

Items in fields of this type doesn't, in constrast to Reference, include links to records. This means aiosnow must be made aware of the location of these objects.

While this can be done in a variety of ways, the cleanest and most generic is probably via the schema constructor:

class TreeSchema(ModelSchema):
    name = fields.String()
    age = fields.Integer()
    height = fields.Integer()

class Forest(TableModel):
    name = fields.String()
    trees = TreeSchema(many=True, endpoint="tree")

The endpoint argument can then be picked up when interacting with the model and handled appropriately, e.g. turned into a table name when working with the TableModel.

See #96 for more details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions