:tocdepth: 3 :py:mod:`gws.plugin.model_field.related_feature` ================================================ .. py:module:: gws.plugin.model_field.related_feature .. autoapi-nested-parse:: 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:** :source:`gws.plugin.model_field.related_feature` Package Contents ---------------- .. py:class:: Config Bases: :py:obj:`gws.base.model.related_field.Config` Configuration for related feature field. .. py:attribute:: fromColumn :type: str Foreign key column in this table. .. py:attribute:: toColumn :type: str :value: '' Key column in the related model, primary key by default. .. py:attribute:: toModel :type: str Related model. .. py:class:: Object Bases: :py:obj:`gws.base.model.related_field.Object` .. py:attribute:: attributeType .. py:method:: after_create_related(to_feature, mc) .. py:method:: after_select(features, mc) .. py:method:: before_create(feature, mc) .. py:method:: before_update(feature, mc) .. py:method:: before_write(feature: gws.Feature, mc: gws.ModelContext) .. py:method:: configure_relationship() .. py:method:: do_init(feature, mc) .. py:method:: uids_for_key(rel: gws.base.model.related_field.RelRef, key, mc) .. py:class:: Props Bases: :py:obj:`gws.base.model.related_field.Props`