You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Any data field that defines a data association between two models has multiplicity property which is readonly and defines the multiplicity level of an association. DataField.multiplicity can be one of "Many", "One", "ZeroOrOne". Its value is always calculated while getting a data model and cannot be set through data model definition.
Sometimes a one-to-many association between two models may be a one-to-one association e.g.
Parent model has two properties which associate parent model with child model. The first activeChild is a readonly association with filter which returns always an array with zero or one items. The second one children returns an array of associated items.
Solution
Let DataField.multiplicity to be editable in order to have an option to set it as 'Many' or 'ZeroOrOne'. Of course this operation needs extra validation to avoid errors for wrong values of multiplicity property.
The text was updated successfully, but these errors were encountered:
Description
Any data field that defines a data association between two models has
multiplicity
property which is readonly and defines the multiplicity level of an association.DataField.multiplicity
can be one of "Many", "One", "ZeroOrOne". Its value is always calculated while getting a data model and cannot be set through data model definition.Sometimes a one-to-many association between two models may be a one-to-one association e.g.
Parent model has two properties which associate parent model with child model. The first
activeChild
is a readonly association with filter which returns always an array with zero or one items. The second onechildren
returns an array of associated items.So
activeChild
property has "ZeroOrOne" multiplicity but the calculated multiplicity attribute is 'Many'.Child model:
Solution
Let
DataField.multiplicity
to be editable in order to have an option to set it as 'Many' or 'ZeroOrOne'. Of course this operation needs extra validation to avoid errors for wrong values ofmultiplicity
property.The text was updated successfully, but these errors were encountered: