Reference
References another DataObject by key.
- Kotlin Definition:
ReferenceDefinition<T>In which T is the DataModel name - Kotlin Value :
Key<T>In which T is the DataModel - Maryk Yaml Definition:
Reference
Usage options
Section titled “Usage options”- Value
- Map key or value
- Inside List/Set
Validation Options
Section titled “Validation Options”required- default truefinal- default falseunique- default falseminValue- default false. Minimum valuemaxValue- default false. Maximum value
Other options
Section titled “Other options”default- the default value to be used if value was not set.dataModel- Model of DataObjects to be referred to
Examples
Section titled “Examples”Example of a Reference property definition for use within a Model
val friend by reference( index = 1u, dataModel = { Person }, required = false, final = true, unique = true)Example of a separate Reference property definition
val def = ReferenceDefinition( required = true, final = true, unique = true, dataModel = { Person })Storage/Transport Byte representation
Section titled “Storage/Transport Byte representation”The key of the referenced DataObject as bytes. With transport the Length Delimited wiretype is used
String representation
Section titled “String representation”Key as base64 value