gws.plugin.model_field.related_feature

Related Feature field

Represents a child->parent M:1 relationship to another model:

+-------------+         +--------------+
| model       |         | toModel      |
+-------------+         +--------------+
| fromKey     |-------->| toKey        |
+-------------+         +--------------+

The value of the field is the parent feature.

Source code: gws.plugin.model_field.related_feature

Package Contents

class gws.plugin.model_field.related_feature.Config

Bases: gws.base.model.related_field.Config

fromColumn: str

foreign key column in this table

toColumn: str = ''

key column in the related model, primary key by default

toModel: str

related model

class gws.plugin.model_field.related_feature.Object

Bases: gws.base.model.related_field.Object

attributeType
after_select(features, mc)
before_create(feature, mc)
before_update(feature, mc)
before_write(feature: gws.Feature, mc: gws.ModelContext)
configure_relationship()
do_init(feature, mc)
uids_for_key(rel: gws.base.model.related_field.RelRef, key, mc)
class gws.plugin.model_field.related_feature.Props

Bases: gws.base.model.related_field.Props