Embedded Object Property
Note: This type can only be used in object DataModels defined in code and cannot be used for queries.
A property which contains another DataModel as embedded object. See DataModels for more details on how to define DataModels.
- Maryk Yaml Definition:
EmbedObject - Kotlin Definition:
EmbeddedObjectDefinition - Kotlin Value:
TT stands for the DataModel data class
Usage options
Section titled “Usage options”- Value
- Map value
Validation Options
Section titled “Validation Options”required- default truefinal- default false
Other options
Section titled “Other options”default- the default value to be used if value was not set.dataModel- Refers to DataModel to be embedded
Examples
Section titled “Examples”Example of an Embedded Object property definition for use within a Model
val address by embedObject( index = 1u, required = false, final = true, dataModel = { Address })Example of a separate EmbeddedObject property definition
val def = EmbeddedObjectDefinition( required = false, final = true, dataModel = { Address })Transport Byte representation
Section titled “Transport Byte representation”All fields of a DataObject are wrapped in a tag/value pair with LENGTH_DELIMITED wiretype and the value starts with the length of the total bytes of the DataObject