gws.plugin.model_field.related_multi_feature_list
¶
Related Multi Feature List field
Represents a 1:M relationship betweens a “parent” and multiple “child” tables
+---------+ +------------+
| parent | | child 1 |
+---------+ +------------+
| key |-------<<| parent_key |
| | +------------+
| |
| | +------------+
| | | child 2 |
| | +------------+
| |-------<<| parent_key |
| | +------------+
| |
| | +------------+
| | | child 3 |
| | +------------+
| |-------<<| parent_key |
+---------+ +------------+
Source code: gws.plugin.model_field.related_multi_feature_list
Package Contents¶
- class gws.plugin.model_field.related_multi_feature_list.Config¶
Bases:
gws.base.model.related_field.Config
- fromColumn: str = ''¶
key column in this table, primary key by default
- related: list[RelatedItem]¶
related models and keys
- class gws.plugin.model_field.related_multi_feature_list.Object¶
Bases:
gws.base.model.related_field.Object
- attributeType¶
- after_create(feature, mc)¶
- after_delete(features, mc)¶
- after_select(features, mc)¶
- after_update(feature, mc)¶
- after_write(feature: gws.Feature, key, mc: gws.ModelContext)¶
- before_create_related(to_feature, mc)¶
- before_delete(feature, mc)¶
- configure_relationship()¶
- drop_links(to: gws.base.model.related_field.RelRef, to_uids, mc)¶
- to_uids_for_key(to: gws.base.model.related_field.RelRef, key, mc)¶
- class gws.plugin.model_field.related_multi_feature_list.Props¶
- class gws.plugin.model_field.related_multi_feature_list.RelatedItem(*args, **kwargs)¶
Bases:
gws.Data
Basic data object.
This object can be instantiated by passing one or or
dict
arguments and/or keyword args. All dicts keys and keywords become attributes of the object.Accessing an undefined attribute returns
None
and no error is raised, unless the attribute name starts with an underscore.- toColumn: str¶
- toModel: str¶