gws.plugin.model_field.related_feature_list¶
Related feature list field.
Represents a parent->child 1:M relationship to another model:
+--------------+ +-------------+
| parent table | | child table |
+--------------+ +-------------+
| fromColumn |-----<<| toColumn |
+--------------+ +-------------+
The value of the field is a list of child features. fromColumn is the key
column in this model’s table, by default its primary key; toColumn is the
foreign key column in the child model.
The field is implemented as a relatedMultiFeatureList with a single child
model, so it reads and writes the relationship in the same way. Without a
configured widget, the field uses a featureList widget.
Example:
fields+ {
name "pois"
type "relatedFeatureList"
fromColumn "id"
toModel "model_poi"
toColumn "category_id"
widget.type "featureList"
}
Source code: gws.plugin.model_field.related_feature_list
Package Contents¶
- class gws.plugin.model_field.related_feature_list.Config¶
Bases:
gws.base.model.related_field.ConfigField listing related features in another model.
- class gws.plugin.model_field.related_feature_list.Object¶
Bases:
gws.plugin.model_field.related_multi_feature_list.ObjectRelated feature list field object.
- configure_relationship()¶
- class gws.plugin.model_field.related_feature_list.Props¶