Metamodel — field types
Each section below is one field.<subType>. The Attributes table lists
the subtype's own + concern-contributed attributes (provider-tagged); universal
documentation attributes are omitted here (see providers.md).
Allowed children lists the structural child rules with their cardinality
(min..max, * = unbounded).
field.base
Abstract base field — the shared root subtype that concrete field subtypes specialize. Carries the attrs common to every field but binds no concrete data type of its own (falls back to string). Not authored directly: a field.base node fails to load (ERR_ABSTRACT_SUBTYPE_AUTHORED) — this subtype is a registry anchor concrete subtypes inherit from, never a node in a document.
Owning provider: metaobjects-core-types
Attributes
| Attribute | Type | Required | Default | Allowed values | Provider | Description |
|---|---|---|---|---|---|---|
@column |
string | no | metaobjects-db | Physical column name for this field on an rdb source. Defaults to the field name via columnNamingStrategy. | ||
@db.indexed |
boolean | no | metaobjects-db | When true, suppress the @filterable-without-index Loader warning (the field is indexed by other means). | ||
@dbColumnType |
string | no | uuid, jsonb |
metaobjects-db | Physical DB column-type override (ADR-0013 escape hatch). Legal values are uuid | jsonb, both on field.string (uuid = native Postgres uuid column over a string-typed field; jsonb = genuinely-open JSON column). The logical field type and its native binding are unchanged. Native SQL arrays (uuid[]/text[]) are NOT declared here — they are derived from a field subtype + isArray (ADR-0036 Wave 1). The retired timestamp_with_tz value is gone — timezone-awareness lives in field.timestamp (instant by default) + @localTime (the naive opt-out), per ADR-0036 Wave 2. | |
@default |
any | no | metaobjects-core-types | Default value applied to the column when no value is supplied. Its type follows the field's own subtype (string / boolean / number / ...). Converted at consumption time via MetaField.defaultValue(). | ||
@example |
string | no | metaobjects-prompt | FR-010: an example value for this field, shown in the generated output-format prompt fragment. | ||
@filterable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD filter allowlists (Project D filter layer). | ||
@formExclude |
boolean | no | metaobjects-ui | When true, the field is omitted from generated forms. Inert on fields for which no form is generated (e.g. projection/derived fields). | ||
@instruction |
string | no | metaobjects-prompt | FR-010: a short instruction for this field, shown in the generated output-format prompt fragment. | ||
@mutability |
string | no | readWrite, writeOnce, readOnly |
metaobjects-core-types | FR-037 R1: who may write this field, and when. 'readWrite' (the default when absent) — the caller may set it on create and change it on update. 'writeOnce' — the caller sets it on create; it is excluded from the update shape thereafter, so a value presented on PATCH is ignored rather than rejected. 'readOnly' — nobody writes it: codegen emits no setter / writable property, the persistence layer skips the column on INSERT/UPDATE, and Zod/Pydantic/class-validator schemas omit it from input variants; the value is populated by the database (computed column, default expression, trigger), by replication, or by another external owner. The three are mutually exclusive modes of ONE axis — who may write, and when — so the illegal pair is unrepresentable and inheritance has a total order: a subtype may TIGHTEN an inherited mode (readWrite < writeOnce < readOnly) and never loosen it (ERR_MUTABILITY_DOWNGRADE). Pairing a non-readWrite mode with @autoSet is ERR_MUTABILITY_AUTOSET_CONFLICT: @autoSet already says the SERVER supplies the value, which is a different axis from who may write it. | |
@required |
boolean | no | metaobjects-core-types | When true, the field is NOT NULL. Equivalent to attaching a validator.required child. On a non-array string, generated wire-tier input validation (create/patch) additionally rejects the empty string by default — whitespace is accepted — unless an explicit validator.length @min: 0 opts back to presence-only. In-process read models never enforce this at construction. | ||
@sortable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD sort allowlists. Inherits from @filterable by default; set false to opt out. | ||
@sortableDefaultOrder |
string | no | asc, desc |
metaobjects-ui | Direction a sort takes when it names this field but omits the order: a ?sort= |
|
@unique |
boolean | no | metaobjects-core-types | When true, the field gets a column-level UNIQUE constraint. | ||
@xmlText |
boolean | no | metaobjects-prompt | When true, this field receives its element's XML TEXT CONTENT during tolerant extract (JAXB @XmlValue / Jackson @JacksonXmlText / .NET [XmlText]) instead of a same-named child. No effect when the eliciting prompt's @responseFormat is json. |
Allowed children
origin.*— 0..*validator.*— 0..*view.*— 0..*
field.boolean
True/false flag. Binds to the native boolean type; DB column is BOOLEAN.
Owning provider: metaobjects-core-types
When to use: A true/false flag.
Attributes
| Attribute | Type | Required | Default | Allowed values | Provider | Description |
|---|---|---|---|---|---|---|
@column |
string | no | metaobjects-db | Physical column name for this field on an rdb source. Defaults to the field name via columnNamingStrategy. | ||
@db.indexed |
boolean | no | metaobjects-db | When true, suppress the @filterable-without-index Loader warning (the field is indexed by other means). | ||
@dbColumnType |
string | no | uuid, jsonb |
metaobjects-db | Physical DB column-type override (ADR-0013 escape hatch). Legal values are uuid | jsonb, both on field.string (uuid = native Postgres uuid column over a string-typed field; jsonb = genuinely-open JSON column). The logical field type and its native binding are unchanged. Native SQL arrays (uuid[]/text[]) are NOT declared here — they are derived from a field subtype + isArray (ADR-0036 Wave 1). The retired timestamp_with_tz value is gone — timezone-awareness lives in field.timestamp (instant by default) + @localTime (the naive opt-out), per ADR-0036 Wave 2. | |
@default |
any | no | metaobjects-core-types | Default value applied to the column when no value is supplied. Its type follows the field's own subtype (string / boolean / number / ...). Converted at consumption time via MetaField.defaultValue(). | ||
@example |
string | no | metaobjects-prompt | FR-010: an example value for this field, shown in the generated output-format prompt fragment. | ||
@filterable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD filter allowlists (Project D filter layer). | ||
@formExclude |
boolean | no | metaobjects-ui | When true, the field is omitted from generated forms. Inert on fields for which no form is generated (e.g. projection/derived fields). | ||
@instruction |
string | no | metaobjects-prompt | FR-010: a short instruction for this field, shown in the generated output-format prompt fragment. | ||
@mutability |
string | no | readWrite, writeOnce, readOnly |
metaobjects-core-types | FR-037 R1: who may write this field, and when. 'readWrite' (the default when absent) — the caller may set it on create and change it on update. 'writeOnce' — the caller sets it on create; it is excluded from the update shape thereafter, so a value presented on PATCH is ignored rather than rejected. 'readOnly' — nobody writes it: codegen emits no setter / writable property, the persistence layer skips the column on INSERT/UPDATE, and Zod/Pydantic/class-validator schemas omit it from input variants; the value is populated by the database (computed column, default expression, trigger), by replication, or by another external owner. The three are mutually exclusive modes of ONE axis — who may write, and when — so the illegal pair is unrepresentable and inheritance has a total order: a subtype may TIGHTEN an inherited mode (readWrite < writeOnce < readOnly) and never loosen it (ERR_MUTABILITY_DOWNGRADE). Pairing a non-readWrite mode with @autoSet is ERR_MUTABILITY_AUTOSET_CONFLICT: @autoSet already says the SERVER supplies the value, which is a different axis from who may write it. | |
@required |
boolean | no | metaobjects-core-types | When true, the field is NOT NULL. Equivalent to attaching a validator.required child. On a non-array string, generated wire-tier input validation (create/patch) additionally rejects the empty string by default — whitespace is accepted — unless an explicit validator.length @min: 0 opts back to presence-only. In-process read models never enforce this at construction. | ||
@sortable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD sort allowlists. Inherits from @filterable by default; set false to opt out. | ||
@sortableDefaultOrder |
string | no | asc, desc |
metaobjects-ui | Direction a sort takes when it names this field but omits the order: a ?sort= |
|
@unique |
boolean | no | metaobjects-core-types | When true, the field gets a column-level UNIQUE constraint. | ||
@xmlText |
boolean | no | metaobjects-prompt | When true, this field receives its element's XML TEXT CONTENT during tolerant extract (JAXB @XmlValue / Jackson @JacksonXmlText / .NET [XmlText]) instead of a same-named child. No effect when the eliciting prompt's @responseFormat is json. |
Allowed children
origin.*— 0..*validator.*— 0..*view.*— 0..*
field.currency
Stores money as integer minor units (cents). Binds to long; the client formats via @currency/@locale. Float arithmetic for money is forbidden.
Owning provider: metaobjects-core-types
Rules: Storage is integer minor units (cents for USD, yen for JPY) — the wire form is unchanged from long. The server never formats currency; all formatting is client-side via Intl.NumberFormat using @currency (ISO 4217) and @locale (BCP 47). Float arithmetic for money is forbidden.
When to use: A column holds money. Use currency so it stores integer minor-units and the client formats it — never floats or hand-rolled cents math.
Attributes
| Attribute | Type | Required | Default | Allowed values | Provider | Description |
|---|---|---|---|---|---|---|
@column |
string | no | metaobjects-db | Physical column name for this field on an rdb source. Defaults to the field name via columnNamingStrategy. | ||
@currency |
string | no | USD |
metaobjects-core-types | ISO 4217 currency code for a currency-subtype field. Storage is integer minor units; defaults to 'USD' when omitted. | |
@db.indexed |
boolean | no | metaobjects-db | When true, suppress the @filterable-without-index Loader warning (the field is indexed by other means). | ||
@dbColumnType |
string | no | uuid, jsonb |
metaobjects-db | Physical DB column-type override (ADR-0013 escape hatch). Legal values are uuid | jsonb, both on field.string (uuid = native Postgres uuid column over a string-typed field; jsonb = genuinely-open JSON column). The logical field type and its native binding are unchanged. Native SQL arrays (uuid[]/text[]) are NOT declared here — they are derived from a field subtype + isArray (ADR-0036 Wave 1). The retired timestamp_with_tz value is gone — timezone-awareness lives in field.timestamp (instant by default) + @localTime (the naive opt-out), per ADR-0036 Wave 2. | |
@default |
any | no | metaobjects-core-types | Default value applied to the column when no value is supplied. Its type follows the field's own subtype (string / boolean / number / ...). Converted at consumption time via MetaField.defaultValue(). | ||
@example |
string | no | metaobjects-prompt | FR-010: an example value for this field, shown in the generated output-format prompt fragment. | ||
@filterable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD filter allowlists (Project D filter layer). | ||
@formExclude |
boolean | no | metaobjects-ui | When true, the field is omitted from generated forms. Inert on fields for which no form is generated (e.g. projection/derived fields). | ||
@instruction |
string | no | metaobjects-prompt | FR-010: a short instruction for this field, shown in the generated output-format prompt fragment. | ||
@mutability |
string | no | readWrite, writeOnce, readOnly |
metaobjects-core-types | FR-037 R1: who may write this field, and when. 'readWrite' (the default when absent) — the caller may set it on create and change it on update. 'writeOnce' — the caller sets it on create; it is excluded from the update shape thereafter, so a value presented on PATCH is ignored rather than rejected. 'readOnly' — nobody writes it: codegen emits no setter / writable property, the persistence layer skips the column on INSERT/UPDATE, and Zod/Pydantic/class-validator schemas omit it from input variants; the value is populated by the database (computed column, default expression, trigger), by replication, or by another external owner. The three are mutually exclusive modes of ONE axis — who may write, and when — so the illegal pair is unrepresentable and inheritance has a total order: a subtype may TIGHTEN an inherited mode (readWrite < writeOnce < readOnly) and never loosen it (ERR_MUTABILITY_DOWNGRADE). Pairing a non-readWrite mode with @autoSet is ERR_MUTABILITY_AUTOSET_CONFLICT: @autoSet already says the SERVER supplies the value, which is a different axis from who may write it. | |
@required |
boolean | no | metaobjects-core-types | When true, the field is NOT NULL. Equivalent to attaching a validator.required child. On a non-array string, generated wire-tier input validation (create/patch) additionally rejects the empty string by default — whitespace is accepted — unless an explicit validator.length @min: 0 opts back to presence-only. In-process read models never enforce this at construction. | ||
@sortable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD sort allowlists. Inherits from @filterable by default; set false to opt out. | ||
@sortableDefaultOrder |
string | no | asc, desc |
metaobjects-ui | Direction a sort takes when it names this field but omits the order: a ?sort= |
|
@unique |
boolean | no | metaobjects-core-types | When true, the field gets a column-level UNIQUE constraint. | ||
@xmlText |
boolean | no | metaobjects-prompt | When true, this field receives its element's XML TEXT CONTENT during tolerant extract (JAXB @XmlValue / Jackson @JacksonXmlText / .NET [XmlText]) instead of a same-named child. No effect when the eliciting prompt's @responseFormat is json. |
Allowed children
origin.*— 0..*validator.*— 0..*view.*— 0..*
field.date
Calendar date (no time-of-day). Binds to the native date/temporal type; DB column is DATE.
Owning provider: metaobjects-core-types
When to use: A column is a calendar date with no time-of-day. Use date instead of a string.
Attributes
| Attribute | Type | Required | Default | Allowed values | Provider | Description |
|---|---|---|---|---|---|---|
@autoSet |
string | no | onCreate, onUpdate |
metaobjects-db | Auto-set semantics for timestamp-like fields: 'onCreate' stamps on insert, 'onUpdate' stamps on every write. | |
@column |
string | no | metaobjects-db | Physical column name for this field on an rdb source. Defaults to the field name via columnNamingStrategy. | ||
@db.indexed |
boolean | no | metaobjects-db | When true, suppress the @filterable-without-index Loader warning (the field is indexed by other means). | ||
@dbColumnType |
string | no | uuid, jsonb |
metaobjects-db | Physical DB column-type override (ADR-0013 escape hatch). Legal values are uuid | jsonb, both on field.string (uuid = native Postgres uuid column over a string-typed field; jsonb = genuinely-open JSON column). The logical field type and its native binding are unchanged. Native SQL arrays (uuid[]/text[]) are NOT declared here — they are derived from a field subtype + isArray (ADR-0036 Wave 1). The retired timestamp_with_tz value is gone — timezone-awareness lives in field.timestamp (instant by default) + @localTime (the naive opt-out), per ADR-0036 Wave 2. | |
@default |
any | no | metaobjects-core-types | Default value applied to the column when no value is supplied. Its type follows the field's own subtype (string / boolean / number / ...). Converted at consumption time via MetaField.defaultValue(). | ||
@example |
string | no | metaobjects-prompt | FR-010: an example value for this field, shown in the generated output-format prompt fragment. | ||
@filterable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD filter allowlists (Project D filter layer). | ||
@formExclude |
boolean | no | metaobjects-ui | When true, the field is omitted from generated forms. Inert on fields for which no form is generated (e.g. projection/derived fields). | ||
@instruction |
string | no | metaobjects-prompt | FR-010: a short instruction for this field, shown in the generated output-format prompt fragment. | ||
@mutability |
string | no | readWrite, writeOnce, readOnly |
metaobjects-core-types | FR-037 R1: who may write this field, and when. 'readWrite' (the default when absent) — the caller may set it on create and change it on update. 'writeOnce' — the caller sets it on create; it is excluded from the update shape thereafter, so a value presented on PATCH is ignored rather than rejected. 'readOnly' — nobody writes it: codegen emits no setter / writable property, the persistence layer skips the column on INSERT/UPDATE, and Zod/Pydantic/class-validator schemas omit it from input variants; the value is populated by the database (computed column, default expression, trigger), by replication, or by another external owner. The three are mutually exclusive modes of ONE axis — who may write, and when — so the illegal pair is unrepresentable and inheritance has a total order: a subtype may TIGHTEN an inherited mode (readWrite < writeOnce < readOnly) and never loosen it (ERR_MUTABILITY_DOWNGRADE). Pairing a non-readWrite mode with @autoSet is ERR_MUTABILITY_AUTOSET_CONFLICT: @autoSet already says the SERVER supplies the value, which is a different axis from who may write it. | |
@required |
boolean | no | metaobjects-core-types | When true, the field is NOT NULL. Equivalent to attaching a validator.required child. On a non-array string, generated wire-tier input validation (create/patch) additionally rejects the empty string by default — whitespace is accepted — unless an explicit validator.length @min: 0 opts back to presence-only. In-process read models never enforce this at construction. | ||
@sortable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD sort allowlists. Inherits from @filterable by default; set false to opt out. | ||
@sortableDefaultOrder |
string | no | asc, desc |
metaobjects-ui | Direction a sort takes when it names this field but omits the order: a ?sort= |
|
@unique |
boolean | no | metaobjects-core-types | When true, the field gets a column-level UNIQUE constraint. | ||
@xmlText |
boolean | no | metaobjects-prompt | When true, this field receives its element's XML TEXT CONTENT during tolerant extract (JAXB @XmlValue / Jackson @JacksonXmlText / .NET [XmlText]) instead of a same-named child. No effect when the eliciting prompt's @responseFormat is json. |
Allowed children
origin.*— 0..*validator.*— 0..*view.*— 0..*
field.decimal
Precision-exact decimal (use @precision/@scale). Native TS binding is string (lossless); DB column is NUMERIC(p,s); the wire form is a string. Classified DATA_TYPE_STRING so an exact decimal is never silently rounded through a double.
Owning provider: metaobjects-core-types
Rules: The wire and native-TS form is a STRING to stay precision-exact end-to-end (Drizzle pg numeric infers as string; SP-H/ADR-0019). Set @precision (total significant digits) and @scale (digits right of the point) to drive NUMERIC(p,s).
When to use: A value needs exact precision (money amounts, rates, quantities). Use decimal with @precision/@scale — never double, which loses precision.
Attributes
| Attribute | Type | Required | Default | Allowed values | Provider | Description |
|---|---|---|---|---|---|---|
@column |
string | no | metaobjects-db | Physical column name for this field on an rdb source. Defaults to the field name via columnNamingStrategy. | ||
@db.indexed |
boolean | no | metaobjects-db | When true, suppress the @filterable-without-index Loader warning (the field is indexed by other means). | ||
@dbColumnType |
string | no | uuid, jsonb |
metaobjects-db | Physical DB column-type override (ADR-0013 escape hatch). Legal values are uuid | jsonb, both on field.string (uuid = native Postgres uuid column over a string-typed field; jsonb = genuinely-open JSON column). The logical field type and its native binding are unchanged. Native SQL arrays (uuid[]/text[]) are NOT declared here — they are derived from a field subtype + isArray (ADR-0036 Wave 1). The retired timestamp_with_tz value is gone — timezone-awareness lives in field.timestamp (instant by default) + @localTime (the naive opt-out), per ADR-0036 Wave 2. | |
@default |
any | no | metaobjects-core-types | Default value applied to the column when no value is supplied. Its type follows the field's own subtype (string / boolean / number / ...). Converted at consumption time via MetaField.defaultValue(). | ||
@example |
string | no | metaobjects-prompt | FR-010: an example value for this field, shown in the generated output-format prompt fragment. | ||
@filterable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD filter allowlists (Project D filter layer). | ||
@formExclude |
boolean | no | metaobjects-ui | When true, the field is omitted from generated forms. Inert on fields for which no form is generated (e.g. projection/derived fields). | ||
@instruction |
string | no | metaobjects-prompt | FR-010: a short instruction for this field, shown in the generated output-format prompt fragment. | ||
@mutability |
string | no | readWrite, writeOnce, readOnly |
metaobjects-core-types | FR-037 R1: who may write this field, and when. 'readWrite' (the default when absent) — the caller may set it on create and change it on update. 'writeOnce' — the caller sets it on create; it is excluded from the update shape thereafter, so a value presented on PATCH is ignored rather than rejected. 'readOnly' — nobody writes it: codegen emits no setter / writable property, the persistence layer skips the column on INSERT/UPDATE, and Zod/Pydantic/class-validator schemas omit it from input variants; the value is populated by the database (computed column, default expression, trigger), by replication, or by another external owner. The three are mutually exclusive modes of ONE axis — who may write, and when — so the illegal pair is unrepresentable and inheritance has a total order: a subtype may TIGHTEN an inherited mode (readWrite < writeOnce < readOnly) and never loosen it (ERR_MUTABILITY_DOWNGRADE). Pairing a non-readWrite mode with @autoSet is ERR_MUTABILITY_AUTOSET_CONFLICT: @autoSet already says the SERVER supplies the value, which is a different axis from who may write it. | |
@precision |
int | no | metaobjects-core-types | Total number of significant digits for decimal-typed fields. | ||
@required |
boolean | no | metaobjects-core-types | When true, the field is NOT NULL. Equivalent to attaching a validator.required child. On a non-array string, generated wire-tier input validation (create/patch) additionally rejects the empty string by default — whitespace is accepted — unless an explicit validator.length @min: 0 opts back to presence-only. In-process read models never enforce this at construction. | ||
@scale |
int | no | metaobjects-core-types | Number of digits to the right of the decimal point for decimal-typed fields. | ||
@sortable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD sort allowlists. Inherits from @filterable by default; set false to opt out. | ||
@sortableDefaultOrder |
string | no | asc, desc |
metaobjects-ui | Direction a sort takes when it names this field but omits the order: a ?sort= |
|
@unique |
boolean | no | metaobjects-core-types | When true, the field gets a column-level UNIQUE constraint. | ||
@xmlText |
boolean | no | metaobjects-prompt | When true, this field receives its element's XML TEXT CONTENT during tolerant extract (JAXB @XmlValue / Jackson @JacksonXmlText / .NET [XmlText]) instead of a same-named child. No effect when the eliciting prompt's @responseFormat is json. |
Allowed children
origin.*— 0..*validator.*— 0..*view.*— 0..*
field.double
Double-precision (64-bit) IEEE-754 floating point. Binds to the native double/number type; DB column is DOUBLE PRECISION. Not for money — use field.currency or field.decimal.
Owning provider: metaobjects-core-types
When to use: An approximate floating-point number where exactness is not required. For money/precision use decimal.
Attributes
| Attribute | Type | Required | Default | Allowed values | Provider | Description |
|---|---|---|---|---|---|---|
@column |
string | no | metaobjects-db | Physical column name for this field on an rdb source. Defaults to the field name via columnNamingStrategy. | ||
@db.indexed |
boolean | no | metaobjects-db | When true, suppress the @filterable-without-index Loader warning (the field is indexed by other means). | ||
@dbColumnType |
string | no | uuid, jsonb |
metaobjects-db | Physical DB column-type override (ADR-0013 escape hatch). Legal values are uuid | jsonb, both on field.string (uuid = native Postgres uuid column over a string-typed field; jsonb = genuinely-open JSON column). The logical field type and its native binding are unchanged. Native SQL arrays (uuid[]/text[]) are NOT declared here — they are derived from a field subtype + isArray (ADR-0036 Wave 1). The retired timestamp_with_tz value is gone — timezone-awareness lives in field.timestamp (instant by default) + @localTime (the naive opt-out), per ADR-0036 Wave 2. | |
@default |
any | no | metaobjects-core-types | Default value applied to the column when no value is supplied. Its type follows the field's own subtype (string / boolean / number / ...). Converted at consumption time via MetaField.defaultValue(). | ||
@example |
string | no | metaobjects-prompt | FR-010: an example value for this field, shown in the generated output-format prompt fragment. | ||
@filterable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD filter allowlists (Project D filter layer). | ||
@formExclude |
boolean | no | metaobjects-ui | When true, the field is omitted from generated forms. Inert on fields for which no form is generated (e.g. projection/derived fields). | ||
@instruction |
string | no | metaobjects-prompt | FR-010: a short instruction for this field, shown in the generated output-format prompt fragment. | ||
@mutability |
string | no | readWrite, writeOnce, readOnly |
metaobjects-core-types | FR-037 R1: who may write this field, and when. 'readWrite' (the default when absent) — the caller may set it on create and change it on update. 'writeOnce' — the caller sets it on create; it is excluded from the update shape thereafter, so a value presented on PATCH is ignored rather than rejected. 'readOnly' — nobody writes it: codegen emits no setter / writable property, the persistence layer skips the column on INSERT/UPDATE, and Zod/Pydantic/class-validator schemas omit it from input variants; the value is populated by the database (computed column, default expression, trigger), by replication, or by another external owner. The three are mutually exclusive modes of ONE axis — who may write, and when — so the illegal pair is unrepresentable and inheritance has a total order: a subtype may TIGHTEN an inherited mode (readWrite < writeOnce < readOnly) and never loosen it (ERR_MUTABILITY_DOWNGRADE). Pairing a non-readWrite mode with @autoSet is ERR_MUTABILITY_AUTOSET_CONFLICT: @autoSet already says the SERVER supplies the value, which is a different axis from who may write it. | |
@required |
boolean | no | metaobjects-core-types | When true, the field is NOT NULL. Equivalent to attaching a validator.required child. On a non-array string, generated wire-tier input validation (create/patch) additionally rejects the empty string by default — whitespace is accepted — unless an explicit validator.length @min: 0 opts back to presence-only. In-process read models never enforce this at construction. | ||
@sortable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD sort allowlists. Inherits from @filterable by default; set false to opt out. | ||
@sortableDefaultOrder |
string | no | asc, desc |
metaobjects-ui | Direction a sort takes when it names this field but omits the order: a ?sort= |
|
@unique |
boolean | no | metaobjects-core-types | When true, the field gets a column-level UNIQUE constraint. | ||
@xmlText |
boolean | no | metaobjects-prompt | When true, this field receives its element's XML TEXT CONTENT during tolerant extract (JAXB @XmlValue / Jackson @JacksonXmlText / .NET [XmlText]) instead of a same-named child. No effect when the eliciting prompt's @responseFormat is json. |
Allowed children
origin.*— 0..*validator.*— 0..*view.*— 0..*
field.enum
String-backed enumeration constrained to a closed set of member symbols (@values). Each member is its own stored string with no name/value divergence.
Owning provider: metaobjects-core-types
Rules: Required @values is a non-empty, duplicate-free set; each member must match ^[A-Za-z_][A-Za-z0-9_]*$ so symbol == stored string in every target language. Optional FR-010/FR-011 overlays add tolerant-extract aliasing (@enumAlias), per-member docs (@enumDoc), an uncoercible-value fallback (@coerceDefault, must be one of @values), and ASCII normalization mode (@normalize).
When to use: A field is a fixed, closed set of string values. Set @values so the union type, DB CHECK, and validation are generated — don't hand-roll constants + checks.
Attributes
| Attribute | Type | Required | Default | Allowed values | Provider | Description |
|---|---|---|---|---|---|---|
@coerceDefault |
string | no | metaobjects-prompt | Fallback enum member used by tolerant extract when a present value cannot be coerced; must be one of the field's @values. | ||
@column |
string | no | metaobjects-db | Physical column name for this field on an rdb source. Defaults to the field name via columnNamingStrategy. | ||
@db.indexed |
boolean | no | metaobjects-db | When true, suppress the @filterable-without-index Loader warning (the field is indexed by other means). | ||
@dbColumnType |
string | no | uuid, jsonb |
metaobjects-db | Physical DB column-type override (ADR-0013 escape hatch). Legal values are uuid | jsonb, both on field.string (uuid = native Postgres uuid column over a string-typed field; jsonb = genuinely-open JSON column). The logical field type and its native binding are unchanged. Native SQL arrays (uuid[]/text[]) are NOT declared here — they are derived from a field subtype + isArray (ADR-0036 Wave 1). The retired timestamp_with_tz value is gone — timezone-awareness lives in field.timestamp (instant by default) + @localTime (the naive opt-out), per ADR-0036 Wave 2. | |
@default |
any | no | metaobjects-core-types | Default value applied to the column when no value is supplied. Its type follows the field's own subtype (string / boolean / number / ...). Converted at consumption time via MetaField.defaultValue(). | ||
@enumAlias |
properties | no | metaobjects-prompt | Map of alternate/off-vocabulary tokens to canonical enum members; feeds the FR-010 tolerant extract alias-fold. | ||
@enumDoc |
properties | no | metaobjects-prompt | Map of enum member to a human-readable description; shown per-member in the FR-010 'guide'-style prompt fragment. | ||
@example |
string | no | metaobjects-prompt | FR-010: an example value for this field, shown in the generated output-format prompt fragment. | ||
@filterable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD filter allowlists (Project D filter layer). | ||
@formExclude |
boolean | no | metaobjects-ui | When true, the field is omitted from generated forms. Inert on fields for which no form is generated (e.g. projection/derived fields). | ||
@instruction |
string | no | metaobjects-prompt | FR-010: a short instruction for this field, shown in the generated output-format prompt fragment. | ||
@intValueMap |
intMap | no | metaobjects-core-types | Optional per-member int values ({member: int}) switching this enum field's DB persistence from string+CHECK to integer+CHECK. Keys must exactly match @values; values must be unique integers. The generated native type and wire format are unchanged in every language. | ||
@mutability |
string | no | readWrite, writeOnce, readOnly |
metaobjects-core-types | FR-037 R1: who may write this field, and when. 'readWrite' (the default when absent) — the caller may set it on create and change it on update. 'writeOnce' — the caller sets it on create; it is excluded from the update shape thereafter, so a value presented on PATCH is ignored rather than rejected. 'readOnly' — nobody writes it: codegen emits no setter / writable property, the persistence layer skips the column on INSERT/UPDATE, and Zod/Pydantic/class-validator schemas omit it from input variants; the value is populated by the database (computed column, default expression, trigger), by replication, or by another external owner. The three are mutually exclusive modes of ONE axis — who may write, and when — so the illegal pair is unrepresentable and inheritance has a total order: a subtype may TIGHTEN an inherited mode (readWrite < writeOnce < readOnly) and never loosen it (ERR_MUTABILITY_DOWNGRADE). Pairing a non-readWrite mode with @autoSet is ERR_MUTABILITY_AUTOSET_CONFLICT: @autoSet already says the SERVER supplies the value, which is a different axis from who may write it. | |
@normalize |
string | no | strip |
none, collapse, strip |
metaobjects-prompt | ASCII normalization mode for tolerant enum extract (none|collapse|strip, default strip). On field.enum it is per-field; on object.value it is the default for the object's enum fields. |
@provided |
boolean | no | metaobjects-core-types | FR-019: marks an abstract package-level field.enum as externally provided — codegen references the type (resolved via per-port codegen config) instead of materializing it. Default false. Not a field attr — it lives on the type declaration. | ||
@required |
boolean | no | metaobjects-core-types | When true, the field is NOT NULL. Equivalent to attaching a validator.required child. On a non-array string, generated wire-tier input validation (create/patch) additionally rejects the empty string by default — whitespace is accepted — unless an explicit validator.length @min: 0 opts back to presence-only. In-process read models never enforce this at construction. | ||
@sortable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD sort allowlists. Inherits from @filterable by default; set false to opt out. | ||
@sortableDefaultOrder |
string | no | asc, desc |
metaobjects-ui | Direction a sort takes when it names this field but omits the order: a ?sort= |
|
@unique |
boolean | no | metaobjects-core-types | When true, the field gets a column-level UNIQUE constraint. | ||
@values |
string[] | yes | metaobjects-core-types | Member symbols of an enum-subtype field. Declaration order is significant; each is a legal identifier and its own stored string. | ||
@xmlText |
boolean | no | metaobjects-prompt | When true, this field receives its element's XML TEXT CONTENT during tolerant extract (JAXB @XmlValue / Jackson @JacksonXmlText / .NET [XmlText]) instead of a same-named child. No effect when the eliciting prompt's @responseFormat is json. |
Allowed children
origin.*— 0..*validator.*— 0..*view.*— 0..*
field.float
Single-precision floating point. Binds to the native double/number type (TS has no distinct float); DB column is REAL. Not for money.
Owning provider: metaobjects-core-types
Attributes
| Attribute | Type | Required | Default | Allowed values | Provider | Description |
|---|---|---|---|---|---|---|
@column |
string | no | metaobjects-db | Physical column name for this field on an rdb source. Defaults to the field name via columnNamingStrategy. | ||
@db.indexed |
boolean | no | metaobjects-db | When true, suppress the @filterable-without-index Loader warning (the field is indexed by other means). | ||
@dbColumnType |
string | no | uuid, jsonb |
metaobjects-db | Physical DB column-type override (ADR-0013 escape hatch). Legal values are uuid | jsonb, both on field.string (uuid = native Postgres uuid column over a string-typed field; jsonb = genuinely-open JSON column). The logical field type and its native binding are unchanged. Native SQL arrays (uuid[]/text[]) are NOT declared here — they are derived from a field subtype + isArray (ADR-0036 Wave 1). The retired timestamp_with_tz value is gone — timezone-awareness lives in field.timestamp (instant by default) + @localTime (the naive opt-out), per ADR-0036 Wave 2. | |
@default |
any | no | metaobjects-core-types | Default value applied to the column when no value is supplied. Its type follows the field's own subtype (string / boolean / number / ...). Converted at consumption time via MetaField.defaultValue(). | ||
@example |
string | no | metaobjects-prompt | FR-010: an example value for this field, shown in the generated output-format prompt fragment. | ||
@filterable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD filter allowlists (Project D filter layer). | ||
@formExclude |
boolean | no | metaobjects-ui | When true, the field is omitted from generated forms. Inert on fields for which no form is generated (e.g. projection/derived fields). | ||
@instruction |
string | no | metaobjects-prompt | FR-010: a short instruction for this field, shown in the generated output-format prompt fragment. | ||
@mutability |
string | no | readWrite, writeOnce, readOnly |
metaobjects-core-types | FR-037 R1: who may write this field, and when. 'readWrite' (the default when absent) — the caller may set it on create and change it on update. 'writeOnce' — the caller sets it on create; it is excluded from the update shape thereafter, so a value presented on PATCH is ignored rather than rejected. 'readOnly' — nobody writes it: codegen emits no setter / writable property, the persistence layer skips the column on INSERT/UPDATE, and Zod/Pydantic/class-validator schemas omit it from input variants; the value is populated by the database (computed column, default expression, trigger), by replication, or by another external owner. The three are mutually exclusive modes of ONE axis — who may write, and when — so the illegal pair is unrepresentable and inheritance has a total order: a subtype may TIGHTEN an inherited mode (readWrite < writeOnce < readOnly) and never loosen it (ERR_MUTABILITY_DOWNGRADE). Pairing a non-readWrite mode with @autoSet is ERR_MUTABILITY_AUTOSET_CONFLICT: @autoSet already says the SERVER supplies the value, which is a different axis from who may write it. | |
@required |
boolean | no | metaobjects-core-types | When true, the field is NOT NULL. Equivalent to attaching a validator.required child. On a non-array string, generated wire-tier input validation (create/patch) additionally rejects the empty string by default — whitespace is accepted — unless an explicit validator.length @min: 0 opts back to presence-only. In-process read models never enforce this at construction. | ||
@sortable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD sort allowlists. Inherits from @filterable by default; set false to opt out. | ||
@sortableDefaultOrder |
string | no | asc, desc |
metaobjects-ui | Direction a sort takes when it names this field but omits the order: a ?sort= |
|
@unique |
boolean | no | metaobjects-core-types | When true, the field gets a column-level UNIQUE constraint. | ||
@xmlText |
boolean | no | metaobjects-prompt | When true, this field receives its element's XML TEXT CONTENT during tolerant extract (JAXB @XmlValue / Jackson @JacksonXmlText / .NET [XmlText]) instead of a same-named child. No effect when the eliciting prompt's @responseFormat is json. |
Allowed children
origin.*— 0..*validator.*— 0..*view.*— 0..*
field.inet
An IP-address string (IPv4 or IPv6) (ADR-0036/0037 — a concept with a native type + behavior, so a subtype not a @stringFormat). Binds to TS string (TS has no native IP type, same as field.uuid); other ports bind to their native IP type (Java java.net.InetAddress, C# System.Net.IPAddress, Python ipaddress, Kotlin java.net.InetAddress). DB column is the Postgres-native inet type. Codegen emits an IPv4-or-IPv6 literal validator (a Zod regex union in TS — z.string().ip() was removed in Zod 4 — native IP-type parsing in the other ports); add @lenient to bind a plain string with no validator. v1 ships WITHOUT @kind — the native type subsumes ipv4/ipv6; @kind is reserved for a later ipv4|ipv6 value-constraint.
Owning provider: metaobjects-core-types
When to use: A field holds an IPv4 or IPv6 address. Use it for a native Postgres inet column + IP validation instead of a plain string.
Attributes
| Attribute | Type | Required | Default | Allowed values | Provider | Description |
|---|---|---|---|---|---|---|
@column |
string | no | metaobjects-db | Physical column name for this field on an rdb source. Defaults to the field name via columnNamingStrategy. | ||
@db.indexed |
boolean | no | metaobjects-db | When true, suppress the @filterable-without-index Loader warning (the field is indexed by other means). | ||
@dbColumnType |
string | no | uuid, jsonb |
metaobjects-db | Physical DB column-type override (ADR-0013 escape hatch). Legal values are uuid | jsonb, both on field.string (uuid = native Postgres uuid column over a string-typed field; jsonb = genuinely-open JSON column). The logical field type and its native binding are unchanged. Native SQL arrays (uuid[]/text[]) are NOT declared here — they are derived from a field subtype + isArray (ADR-0036 Wave 1). The retired timestamp_with_tz value is gone — timezone-awareness lives in field.timestamp (instant by default) + @localTime (the naive opt-out), per ADR-0036 Wave 2. | |
@default |
any | no | metaobjects-core-types | Default value applied to the column when no value is supplied. Its type follows the field's own subtype (string / boolean / number / ...). Converted at consumption time via MetaField.defaultValue(). | ||
@example |
string | no | metaobjects-prompt | FR-010: an example value for this field, shown in the generated output-format prompt fragment. | ||
@filterable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD filter allowlists (Project D filter layer). | ||
@formExclude |
boolean | no | metaobjects-ui | When true, the field is omitted from generated forms. Inert on fields for which no form is generated (e.g. projection/derived fields). | ||
@instruction |
string | no | metaobjects-prompt | FR-010: a short instruction for this field, shown in the generated output-format prompt fragment. | ||
@lenient |
boolean | no | metaobjects-core-types | #234: opt this field out of strict well-formedness enforcement. When true, codegen binds a plain string (no URL/IP validator, no native URI/InetAddress type; field.inet uses a text column, not the native inet type) so a not-strictly-valid value round-trips unchanged. Default (absent/false) is strict: an absolute-scheme URI / an IPv4-or-IPv6 literal. | ||
@mutability |
string | no | readWrite, writeOnce, readOnly |
metaobjects-core-types | FR-037 R1: who may write this field, and when. 'readWrite' (the default when absent) — the caller may set it on create and change it on update. 'writeOnce' — the caller sets it on create; it is excluded from the update shape thereafter, so a value presented on PATCH is ignored rather than rejected. 'readOnly' — nobody writes it: codegen emits no setter / writable property, the persistence layer skips the column on INSERT/UPDATE, and Zod/Pydantic/class-validator schemas omit it from input variants; the value is populated by the database (computed column, default expression, trigger), by replication, or by another external owner. The three are mutually exclusive modes of ONE axis — who may write, and when — so the illegal pair is unrepresentable and inheritance has a total order: a subtype may TIGHTEN an inherited mode (readWrite < writeOnce < readOnly) and never loosen it (ERR_MUTABILITY_DOWNGRADE). Pairing a non-readWrite mode with @autoSet is ERR_MUTABILITY_AUTOSET_CONFLICT: @autoSet already says the SERVER supplies the value, which is a different axis from who may write it. | |
@required |
boolean | no | metaobjects-core-types | When true, the field is NOT NULL. Equivalent to attaching a validator.required child. On a non-array string, generated wire-tier input validation (create/patch) additionally rejects the empty string by default — whitespace is accepted — unless an explicit validator.length @min: 0 opts back to presence-only. In-process read models never enforce this at construction. | ||
@sortable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD sort allowlists. Inherits from @filterable by default; set false to opt out. | ||
@sortableDefaultOrder |
string | no | asc, desc |
metaobjects-ui | Direction a sort takes when it names this field but omits the order: a ?sort= |
|
@unique |
boolean | no | metaobjects-core-types | When true, the field gets a column-level UNIQUE constraint. | ||
@xmlText |
boolean | no | metaobjects-prompt | When true, this field receives its element's XML TEXT CONTENT during tolerant extract (JAXB @XmlValue / Jackson @JacksonXmlText / .NET [XmlText]) instead of a same-named child. No effect when the eliciting prompt's @responseFormat is json. |
Allowed children
origin.*— 0..*validator.*— 0..*view.*— 0..*
field.int
32-bit signed integer. Binds to the native int type; DB column is INTEGER.
Owning provider: metaobjects-core-types
When to use: A whole number within +/-2^31. Use long instead if values can exceed that.
Attributes
| Attribute | Type | Required | Default | Allowed values | Provider | Description |
|---|---|---|---|---|---|---|
@column |
string | no | metaobjects-db | Physical column name for this field on an rdb source. Defaults to the field name via columnNamingStrategy. | ||
@db.indexed |
boolean | no | metaobjects-db | When true, suppress the @filterable-without-index Loader warning (the field is indexed by other means). | ||
@dbColumnType |
string | no | uuid, jsonb |
metaobjects-db | Physical DB column-type override (ADR-0013 escape hatch). Legal values are uuid | jsonb, both on field.string (uuid = native Postgres uuid column over a string-typed field; jsonb = genuinely-open JSON column). The logical field type and its native binding are unchanged. Native SQL arrays (uuid[]/text[]) are NOT declared here — they are derived from a field subtype + isArray (ADR-0036 Wave 1). The retired timestamp_with_tz value is gone — timezone-awareness lives in field.timestamp (instant by default) + @localTime (the naive opt-out), per ADR-0036 Wave 2. | |
@default |
any | no | metaobjects-core-types | Default value applied to the column when no value is supplied. Its type follows the field's own subtype (string / boolean / number / ...). Converted at consumption time via MetaField.defaultValue(). | ||
@example |
string | no | metaobjects-prompt | FR-010: an example value for this field, shown in the generated output-format prompt fragment. | ||
@filterable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD filter allowlists (Project D filter layer). | ||
@formExclude |
boolean | no | metaobjects-ui | When true, the field is omitted from generated forms. Inert on fields for which no form is generated (e.g. projection/derived fields). | ||
@instruction |
string | no | metaobjects-prompt | FR-010: a short instruction for this field, shown in the generated output-format prompt fragment. | ||
@mutability |
string | no | readWrite, writeOnce, readOnly |
metaobjects-core-types | FR-037 R1: who may write this field, and when. 'readWrite' (the default when absent) — the caller may set it on create and change it on update. 'writeOnce' — the caller sets it on create; it is excluded from the update shape thereafter, so a value presented on PATCH is ignored rather than rejected. 'readOnly' — nobody writes it: codegen emits no setter / writable property, the persistence layer skips the column on INSERT/UPDATE, and Zod/Pydantic/class-validator schemas omit it from input variants; the value is populated by the database (computed column, default expression, trigger), by replication, or by another external owner. The three are mutually exclusive modes of ONE axis — who may write, and when — so the illegal pair is unrepresentable and inheritance has a total order: a subtype may TIGHTEN an inherited mode (readWrite < writeOnce < readOnly) and never loosen it (ERR_MUTABILITY_DOWNGRADE). Pairing a non-readWrite mode with @autoSet is ERR_MUTABILITY_AUTOSET_CONFLICT: @autoSet already says the SERVER supplies the value, which is a different axis from who may write it. | |
@required |
boolean | no | metaobjects-core-types | When true, the field is NOT NULL. Equivalent to attaching a validator.required child. On a non-array string, generated wire-tier input validation (create/patch) additionally rejects the empty string by default — whitespace is accepted — unless an explicit validator.length @min: 0 opts back to presence-only. In-process read models never enforce this at construction. | ||
@sortable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD sort allowlists. Inherits from @filterable by default; set false to opt out. | ||
@sortableDefaultOrder |
string | no | asc, desc |
metaobjects-ui | Direction a sort takes when it names this field but omits the order: a ?sort= |
|
@unique |
boolean | no | metaobjects-core-types | When true, the field gets a column-level UNIQUE constraint. | ||
@xmlText |
boolean | no | metaobjects-prompt | When true, this field receives its element's XML TEXT CONTENT during tolerant extract (JAXB @XmlValue / Jackson @JacksonXmlText / .NET [XmlText]) instead of a same-named child. No effect when the eliciting prompt's @responseFormat is json. |
Allowed children
origin.*— 0..*validator.*— 0..*view.*— 0..*
field.long
64-bit signed integer. Binds to the native long/bigint type; DB column is BIGINT.
Owning provider: metaobjects-core-types
When to use: A whole number that may exceed 32 bits (ids, counters, epoch millis).
Attributes
| Attribute | Type | Required | Default | Allowed values | Provider | Description |
|---|---|---|---|---|---|---|
@column |
string | no | metaobjects-db | Physical column name for this field on an rdb source. Defaults to the field name via columnNamingStrategy. | ||
@db.indexed |
boolean | no | metaobjects-db | When true, suppress the @filterable-without-index Loader warning (the field is indexed by other means). | ||
@dbColumnType |
string | no | uuid, jsonb |
metaobjects-db | Physical DB column-type override (ADR-0013 escape hatch). Legal values are uuid | jsonb, both on field.string (uuid = native Postgres uuid column over a string-typed field; jsonb = genuinely-open JSON column). The logical field type and its native binding are unchanged. Native SQL arrays (uuid[]/text[]) are NOT declared here — they are derived from a field subtype + isArray (ADR-0036 Wave 1). The retired timestamp_with_tz value is gone — timezone-awareness lives in field.timestamp (instant by default) + @localTime (the naive opt-out), per ADR-0036 Wave 2. | |
@default |
any | no | metaobjects-core-types | Default value applied to the column when no value is supplied. Its type follows the field's own subtype (string / boolean / number / ...). Converted at consumption time via MetaField.defaultValue(). | ||
@example |
string | no | metaobjects-prompt | FR-010: an example value for this field, shown in the generated output-format prompt fragment. | ||
@filterable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD filter allowlists (Project D filter layer). | ||
@formExclude |
boolean | no | metaobjects-ui | When true, the field is omitted from generated forms. Inert on fields for which no form is generated (e.g. projection/derived fields). | ||
@instruction |
string | no | metaobjects-prompt | FR-010: a short instruction for this field, shown in the generated output-format prompt fragment. | ||
@mutability |
string | no | readWrite, writeOnce, readOnly |
metaobjects-core-types | FR-037 R1: who may write this field, and when. 'readWrite' (the default when absent) — the caller may set it on create and change it on update. 'writeOnce' — the caller sets it on create; it is excluded from the update shape thereafter, so a value presented on PATCH is ignored rather than rejected. 'readOnly' — nobody writes it: codegen emits no setter / writable property, the persistence layer skips the column on INSERT/UPDATE, and Zod/Pydantic/class-validator schemas omit it from input variants; the value is populated by the database (computed column, default expression, trigger), by replication, or by another external owner. The three are mutually exclusive modes of ONE axis — who may write, and when — so the illegal pair is unrepresentable and inheritance has a total order: a subtype may TIGHTEN an inherited mode (readWrite < writeOnce < readOnly) and never loosen it (ERR_MUTABILITY_DOWNGRADE). Pairing a non-readWrite mode with @autoSet is ERR_MUTABILITY_AUTOSET_CONFLICT: @autoSet already says the SERVER supplies the value, which is a different axis from who may write it. | |
@required |
boolean | no | metaobjects-core-types | When true, the field is NOT NULL. Equivalent to attaching a validator.required child. On a non-array string, generated wire-tier input validation (create/patch) additionally rejects the empty string by default — whitespace is accepted — unless an explicit validator.length @min: 0 opts back to presence-only. In-process read models never enforce this at construction. | ||
@sortable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD sort allowlists. Inherits from @filterable by default; set false to opt out. | ||
@sortableDefaultOrder |
string | no | asc, desc |
metaobjects-ui | Direction a sort takes when it names this field but omits the order: a ?sort= |
|
@unique |
boolean | no | metaobjects-core-types | When true, the field gets a column-level UNIQUE constraint. | ||
@xmlText |
boolean | no | metaobjects-prompt | When true, this field receives its element's XML TEXT CONTENT during tolerant extract (JAXB @XmlValue / Jackson @JacksonXmlText / .NET [XmlText]) instead of a same-named child. No effect when the eliciting prompt's @responseFormat is json. |
Allowed children
origin.*— 0..*validator.*— 0..*view.*— 0..*
field.map
An open-keyed map (Record<string,V> / dict[str,V]) stored in a single jsonb column. Keys are always strings (the JSON object constraint); the value type is set by @valueType (a scalar field subtype) or @objectRef (a value-object).
Owning provider: metaobjects-core-types
Rules: Keys are always strings. Set exactly one of @valueType (a scalar value subtype: string/int/long/double/float/decimal/boolean/date/time/timestamp/uuid) or @objectRef (a value-object name or FQN). Stored as a single jsonb column holding the JSON object — never a native array; isArray does not apply.
When to use: A field is an open-keyed map of values (Record<string,V>). Use it for dynamic keys instead of an untyped jsonb string.
Attributes
| Attribute | Type | Required | Default | Allowed values | Provider | Description |
|---|---|---|---|---|---|---|
@column |
string | no | metaobjects-db | Physical column name for this field on an rdb source. Defaults to the field name via columnNamingStrategy. | ||
@db.indexed |
boolean | no | metaobjects-db | When true, suppress the @filterable-without-index Loader warning (the field is indexed by other means). | ||
@dbColumnType |
string | no | uuid, jsonb |
metaobjects-db | Physical DB column-type override (ADR-0013 escape hatch). Legal values are uuid | jsonb, both on field.string (uuid = native Postgres uuid column over a string-typed field; jsonb = genuinely-open JSON column). The logical field type and its native binding are unchanged. Native SQL arrays (uuid[]/text[]) are NOT declared here — they are derived from a field subtype + isArray (ADR-0036 Wave 1). The retired timestamp_with_tz value is gone — timezone-awareness lives in field.timestamp (instant by default) + @localTime (the naive opt-out), per ADR-0036 Wave 2. | |
@default |
any | no | metaobjects-core-types | Default value applied to the column when no value is supplied. Its type follows the field's own subtype (string / boolean / number / ...). Converted at consumption time via MetaField.defaultValue(). | ||
@example |
string | no | metaobjects-prompt | FR-010: an example value for this field, shown in the generated output-format prompt fragment. | ||
@filterable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD filter allowlists (Project D filter layer). | ||
@formExclude |
boolean | no | metaobjects-ui | When true, the field is omitted from generated forms. Inert on fields for which no form is generated (e.g. projection/derived fields). | ||
@instruction |
string | no | metaobjects-prompt | FR-010: a short instruction for this field, shown in the generated output-format prompt fragment. | ||
@mutability |
string | no | readWrite, writeOnce, readOnly |
metaobjects-core-types | FR-037 R1: who may write this field, and when. 'readWrite' (the default when absent) — the caller may set it on create and change it on update. 'writeOnce' — the caller sets it on create; it is excluded from the update shape thereafter, so a value presented on PATCH is ignored rather than rejected. 'readOnly' — nobody writes it: codegen emits no setter / writable property, the persistence layer skips the column on INSERT/UPDATE, and Zod/Pydantic/class-validator schemas omit it from input variants; the value is populated by the database (computed column, default expression, trigger), by replication, or by another external owner. The three are mutually exclusive modes of ONE axis — who may write, and when — so the illegal pair is unrepresentable and inheritance has a total order: a subtype may TIGHTEN an inherited mode (readWrite < writeOnce < readOnly) and never loosen it (ERR_MUTABILITY_DOWNGRADE). Pairing a non-readWrite mode with @autoSet is ERR_MUTABILITY_AUTOSET_CONFLICT: @autoSet already says the SERVER supplies the value, which is a different axis from who may write it. | |
@objectRef |
string | no | metaobjects-core-types | Name (or FQN) of the value-object for a value-object-valued map. Mutually exclusive with @valueType; exactly one of the two must be set. | ||
@required |
boolean | no | metaobjects-core-types | When true, the field is NOT NULL. Equivalent to attaching a validator.required child. On a non-array string, generated wire-tier input validation (create/patch) additionally rejects the empty string by default — whitespace is accepted — unless an explicit validator.length @min: 0 opts back to presence-only. In-process read models never enforce this at construction. | ||
@sortable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD sort allowlists. Inherits from @filterable by default; set false to opt out. | ||
@sortableDefaultOrder |
string | no | asc, desc |
metaobjects-ui | Direction a sort takes when it names this field but omits the order: a ?sort= |
|
@unique |
boolean | no | metaobjects-core-types | When true, the field gets a column-level UNIQUE constraint. | ||
@valueType |
string | no | metaobjects-core-types | Scalar value subtype for a scalar-valued map (string/int/long/double/float/decimal/boolean/date/time/timestamp/uuid). Mutually exclusive with @objectRef; exactly one of the two must be set. | ||
@xmlText |
boolean | no | metaobjects-prompt | When true, this field receives its element's XML TEXT CONTENT during tolerant extract (JAXB @XmlValue / Jackson @JacksonXmlText / .NET [XmlText]) instead of a same-named child. No effect when the eliciting prompt's @responseFormat is json. |
Allowed children
origin.*— 0..*validator.*— 0..*view.*— 0..*
field.object
A nested structured value (set @objectRef to the target object). Storage is governed by @storage: flattened (prefixed columns), jsonb (single jsonb column, supports isArray), or subdocument (document-store hint).
Owning provider: metaobjects-core-types
Rules: Set @objectRef to the nested object's name (or FQN). @storage selects physical layout — flattened expands into prefixed parent columns (isArray must be false), jsonb stores the structured value (or array when isArray=true) in one jsonb column, subdocument emits no Postgres column. Defaults to single-jsonb-column when @storage is absent.
When to use: A field holds a nested structured value (or an array of them). Set @objectRef + @storage so the shape is typed and persisted (flattened/jsonb) instead of an untyped blob.
Attributes
| Attribute | Type | Required | Default | Allowed values | Provider | Description |
|---|---|---|---|---|---|---|
@column |
string | no | metaobjects-db | Physical column name for this field on an rdb source. Defaults to the field name via columnNamingStrategy. | ||
@db.indexed |
boolean | no | metaobjects-db | When true, suppress the @filterable-without-index Loader warning (the field is indexed by other means). | ||
@dbColumnType |
string | no | uuid, jsonb |
metaobjects-db | Physical DB column-type override (ADR-0013 escape hatch). Legal values are uuid | jsonb, both on field.string (uuid = native Postgres uuid column over a string-typed field; jsonb = genuinely-open JSON column). The logical field type and its native binding are unchanged. Native SQL arrays (uuid[]/text[]) are NOT declared here — they are derived from a field subtype + isArray (ADR-0036 Wave 1). The retired timestamp_with_tz value is gone — timezone-awareness lives in field.timestamp (instant by default) + @localTime (the naive opt-out), per ADR-0036 Wave 2. | |
@default |
any | no | metaobjects-core-types | Default value applied to the column when no value is supplied. Its type follows the field's own subtype (string / boolean / number / ...). Converted at consumption time via MetaField.defaultValue(). | ||
@example |
string | no | metaobjects-prompt | FR-010: an example value for this field, shown in the generated output-format prompt fragment. | ||
@filterable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD filter allowlists (Project D filter layer). | ||
@formExclude |
boolean | no | metaobjects-ui | When true, the field is omitted from generated forms. Inert on fields for which no form is generated (e.g. projection/derived fields). | ||
@instruction |
string | no | metaobjects-prompt | FR-010: a short instruction for this field, shown in the generated output-format prompt fragment. | ||
@mutability |
string | no | readWrite, writeOnce, readOnly |
metaobjects-core-types | FR-037 R1: who may write this field, and when. 'readWrite' (the default when absent) — the caller may set it on create and change it on update. 'writeOnce' — the caller sets it on create; it is excluded from the update shape thereafter, so a value presented on PATCH is ignored rather than rejected. 'readOnly' — nobody writes it: codegen emits no setter / writable property, the persistence layer skips the column on INSERT/UPDATE, and Zod/Pydantic/class-validator schemas omit it from input variants; the value is populated by the database (computed column, default expression, trigger), by replication, or by another external owner. The three are mutually exclusive modes of ONE axis — who may write, and when — so the illegal pair is unrepresentable and inheritance has a total order: a subtype may TIGHTEN an inherited mode (readWrite < writeOnce < readOnly) and never loosen it (ERR_MUTABILITY_DOWNGRADE). Pairing a non-readWrite mode with @autoSet is ERR_MUTABILITY_AUTOSET_CONFLICT: @autoSet already says the SERVER supplies the value, which is a different axis from who may write it. | |
@objectRef |
string | no | metaobjects-core-types | Name (or FQN) of the target object an object-typed field nests — drives nested-object (de)serialization. | ||
@required |
boolean | no | metaobjects-core-types | When true, the field is NOT NULL. Equivalent to attaching a validator.required child. On a non-array string, generated wire-tier input validation (create/patch) additionally rejects the empty string by default — whitespace is accepted — unless an explicit validator.length @min: 0 opts back to presence-only. In-process read models never enforce this at construction. | ||
@sortable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD sort allowlists. Inherits from @filterable by default; set false to opt out. | ||
@sortableDefaultOrder |
string | no | asc, desc |
metaobjects-ui | Direction a sort takes when it names this field but omits the order: a ?sort= |
|
@storage |
string | no | flattened, jsonb, subdocument |
metaobjects-db | Storage strategy for an object-typed field (set with @objectRef). "flattened" expands the nested value into prefixed columns on the parent table. "jsonb" stores the structured value in a single jsonb column (supports isArray=true for arrays of values). "subdocument" is a hint for document-store codegen targets and emits no Postgres column. | |
@unique |
boolean | no | metaobjects-core-types | When true, the field gets a column-level UNIQUE constraint. | ||
@xmlText |
boolean | no | metaobjects-prompt | When true, this field receives its element's XML TEXT CONTENT during tolerant extract (JAXB @XmlValue / Jackson @JacksonXmlText / .NET [XmlText]) instead of a same-named child. No effect when the eliciting prompt's @responseFormat is json. |
Allowed children
origin.*— 0..*validator.*— 0..*view.*— 0..*
field.string
Variable-length text. Binds to the native string type; DB column is VARCHAR/TEXT (use @maxLength for VARCHAR(n)).
Owning provider: metaobjects-core-types
When to use: Plain variable-length text. Set @maxLength to size the column. The default for textual data.
Attributes
| Attribute | Type | Required | Default | Allowed values | Provider | Description |
|---|---|---|---|---|---|---|
@column |
string | no | metaobjects-db | Physical column name for this field on an rdb source. Defaults to the field name via columnNamingStrategy. | ||
@db.indexed |
boolean | no | metaobjects-db | When true, suppress the @filterable-without-index Loader warning (the field is indexed by other means). | ||
@dbColumnType |
string | no | uuid, jsonb |
metaobjects-db | Physical DB column-type override (ADR-0013 escape hatch). Legal values are uuid | jsonb, both on field.string (uuid = native Postgres uuid column over a string-typed field; jsonb = genuinely-open JSON column). The logical field type and its native binding are unchanged. Native SQL arrays (uuid[]/text[]) are NOT declared here — they are derived from a field subtype + isArray (ADR-0036 Wave 1). The retired timestamp_with_tz value is gone — timezone-awareness lives in field.timestamp (instant by default) + @localTime (the naive opt-out), per ADR-0036 Wave 2. | |
@default |
any | no | metaobjects-core-types | Default value applied to the column when no value is supplied. Its type follows the field's own subtype (string / boolean / number / ...). Converted at consumption time via MetaField.defaultValue(). | ||
@example |
string | no | metaobjects-prompt | FR-010: an example value for this field, shown in the generated output-format prompt fragment. | ||
@filterable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD filter allowlists (Project D filter layer). | ||
@formExclude |
boolean | no | metaobjects-ui | When true, the field is omitted from generated forms. Inert on fields for which no form is generated (e.g. projection/derived fields). | ||
@instruction |
string | no | metaobjects-prompt | FR-010: a short instruction for this field, shown in the generated output-format prompt fragment. | ||
@maxLength |
int | no | metaobjects-core-types | Maximum character length for string-typed fields (drives VARCHAR(n)). | ||
@mutability |
string | no | readWrite, writeOnce, readOnly |
metaobjects-core-types | FR-037 R1: who may write this field, and when. 'readWrite' (the default when absent) — the caller may set it on create and change it on update. 'writeOnce' — the caller sets it on create; it is excluded from the update shape thereafter, so a value presented on PATCH is ignored rather than rejected. 'readOnly' — nobody writes it: codegen emits no setter / writable property, the persistence layer skips the column on INSERT/UPDATE, and Zod/Pydantic/class-validator schemas omit it from input variants; the value is populated by the database (computed column, default expression, trigger), by replication, or by another external owner. The three are mutually exclusive modes of ONE axis — who may write, and when — so the illegal pair is unrepresentable and inheritance has a total order: a subtype may TIGHTEN an inherited mode (readWrite < writeOnce < readOnly) and never loosen it (ERR_MUTABILITY_DOWNGRADE). Pairing a non-readWrite mode with @autoSet is ERR_MUTABILITY_AUTOSET_CONFLICT: @autoSet already says the SERVER supplies the value, which is a different axis from who may write it. | |
@required |
boolean | no | metaobjects-core-types | When true, the field is NOT NULL. Equivalent to attaching a validator.required child. On a non-array string, generated wire-tier input validation (create/patch) additionally rejects the empty string by default — whitespace is accepted — unless an explicit validator.length @min: 0 opts back to presence-only. In-process read models never enforce this at construction. | ||
@sortable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD sort allowlists. Inherits from @filterable by default; set false to opt out. | ||
@sortableDefaultOrder |
string | no | asc, desc |
metaobjects-ui | Direction a sort takes when it names this field but omits the order: a ?sort= |
|
@stringFormat |
string | no | email, hostname |
metaobjects-core-types | ADR-0036/0037: a closed validation format for a plain string field that has NO native type or behavior of its own — email | hostname. The field stays a plain string (native binding + DB column unchanged); codegen emits the matching validator (Zod z.email() / a hostname check; PG CHECK where appropriate). The canonical matcher per format lives in each port's codegen, NOT author validator.regex (cross-language regex engines diverge). Named @stringFormat (not @format) to avoid colliding with template.* @format (output format). Concepts WITH a native type or behavior are subtypes instead (uuid → field.uuid, url/uri → field.uri, ip → field.inet). | |
@unique |
boolean | no | metaobjects-core-types | When true, the field gets a column-level UNIQUE constraint. | ||
@xmlText |
boolean | no | metaobjects-prompt | When true, this field receives its element's XML TEXT CONTENT during tolerant extract (JAXB @XmlValue / Jackson @JacksonXmlText / .NET [XmlText]) instead of a same-named child. No effect when the eliciting prompt's @responseFormat is json. |
Allowed children
origin.*— 0..*validator.*— 0..*view.*— 0..*
field.time
Time-of-day (no calendar date). Binds to the native date/temporal type; DB column is TIME.
Owning provider: metaobjects-core-types
Attributes
| Attribute | Type | Required | Default | Allowed values | Provider | Description |
|---|---|---|---|---|---|---|
@autoSet |
string | no | onCreate, onUpdate |
metaobjects-db | Auto-set semantics for timestamp-like fields: 'onCreate' stamps on insert, 'onUpdate' stamps on every write. | |
@column |
string | no | metaobjects-db | Physical column name for this field on an rdb source. Defaults to the field name via columnNamingStrategy. | ||
@db.indexed |
boolean | no | metaobjects-db | When true, suppress the @filterable-without-index Loader warning (the field is indexed by other means). | ||
@dbColumnType |
string | no | uuid, jsonb |
metaobjects-db | Physical DB column-type override (ADR-0013 escape hatch). Legal values are uuid | jsonb, both on field.string (uuid = native Postgres uuid column over a string-typed field; jsonb = genuinely-open JSON column). The logical field type and its native binding are unchanged. Native SQL arrays (uuid[]/text[]) are NOT declared here — they are derived from a field subtype + isArray (ADR-0036 Wave 1). The retired timestamp_with_tz value is gone — timezone-awareness lives in field.timestamp (instant by default) + @localTime (the naive opt-out), per ADR-0036 Wave 2. | |
@default |
any | no | metaobjects-core-types | Default value applied to the column when no value is supplied. Its type follows the field's own subtype (string / boolean / number / ...). Converted at consumption time via MetaField.defaultValue(). | ||
@example |
string | no | metaobjects-prompt | FR-010: an example value for this field, shown in the generated output-format prompt fragment. | ||
@filterable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD filter allowlists (Project D filter layer). | ||
@formExclude |
boolean | no | metaobjects-ui | When true, the field is omitted from generated forms. Inert on fields for which no form is generated (e.g. projection/derived fields). | ||
@instruction |
string | no | metaobjects-prompt | FR-010: a short instruction for this field, shown in the generated output-format prompt fragment. | ||
@mutability |
string | no | readWrite, writeOnce, readOnly |
metaobjects-core-types | FR-037 R1: who may write this field, and when. 'readWrite' (the default when absent) — the caller may set it on create and change it on update. 'writeOnce' — the caller sets it on create; it is excluded from the update shape thereafter, so a value presented on PATCH is ignored rather than rejected. 'readOnly' — nobody writes it: codegen emits no setter / writable property, the persistence layer skips the column on INSERT/UPDATE, and Zod/Pydantic/class-validator schemas omit it from input variants; the value is populated by the database (computed column, default expression, trigger), by replication, or by another external owner. The three are mutually exclusive modes of ONE axis — who may write, and when — so the illegal pair is unrepresentable and inheritance has a total order: a subtype may TIGHTEN an inherited mode (readWrite < writeOnce < readOnly) and never loosen it (ERR_MUTABILITY_DOWNGRADE). Pairing a non-readWrite mode with @autoSet is ERR_MUTABILITY_AUTOSET_CONFLICT: @autoSet already says the SERVER supplies the value, which is a different axis from who may write it. | |
@required |
boolean | no | metaobjects-core-types | When true, the field is NOT NULL. Equivalent to attaching a validator.required child. On a non-array string, generated wire-tier input validation (create/patch) additionally rejects the empty string by default — whitespace is accepted — unless an explicit validator.length @min: 0 opts back to presence-only. In-process read models never enforce this at construction. | ||
@sortable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD sort allowlists. Inherits from @filterable by default; set false to opt out. | ||
@sortableDefaultOrder |
string | no | asc, desc |
metaobjects-ui | Direction a sort takes when it names this field but omits the order: a ?sort= |
|
@unique |
boolean | no | metaobjects-core-types | When true, the field gets a column-level UNIQUE constraint. | ||
@xmlText |
boolean | no | metaobjects-prompt | When true, this field receives its element's XML TEXT CONTENT during tolerant extract (JAXB @XmlValue / Jackson @JacksonXmlText / .NET [XmlText]) instead of a same-named child. No effect when the eliciting prompt's @responseFormat is json. |
Allowed children
origin.*— 0..*validator.*— 0..*view.*— 0..*
field.timestamp
Date + time-of-day instant (optionally with timezone). Binds to the native date/temporal type; DB column is TIMESTAMP(TZ). Pair with @autoSet for created/updated stamping.
Owning provider: metaobjects-core-types
When to use: A column records an instant (created/updated at). Use timestamp so it serializes ISO-8601 with timezone consistently.
Attributes
| Attribute | Type | Required | Default | Allowed values | Provider | Description |
|---|---|---|---|---|---|---|
@autoSet |
string | no | onCreate, onUpdate |
metaobjects-db | Auto-set semantics for timestamp-like fields: 'onCreate' stamps on insert, 'onUpdate' stamps on every write. | |
@column |
string | no | metaobjects-db | Physical column name for this field on an rdb source. Defaults to the field name via columnNamingStrategy. | ||
@db.indexed |
boolean | no | metaobjects-db | When true, suppress the @filterable-without-index Loader warning (the field is indexed by other means). | ||
@dbColumnType |
string | no | uuid, jsonb |
metaobjects-db | Physical DB column-type override (ADR-0013 escape hatch). Legal values are uuid | jsonb, both on field.string (uuid = native Postgres uuid column over a string-typed field; jsonb = genuinely-open JSON column). The logical field type and its native binding are unchanged. Native SQL arrays (uuid[]/text[]) are NOT declared here — they are derived from a field subtype + isArray (ADR-0036 Wave 1). The retired timestamp_with_tz value is gone — timezone-awareness lives in field.timestamp (instant by default) + @localTime (the naive opt-out), per ADR-0036 Wave 2. | |
@default |
any | no | metaobjects-core-types | Default value applied to the column when no value is supplied. Its type follows the field's own subtype (string / boolean / number / ...). Converted at consumption time via MetaField.defaultValue(). | ||
@example |
string | no | metaobjects-prompt | FR-010: an example value for this field, shown in the generated output-format prompt fragment. | ||
@filterable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD filter allowlists (Project D filter layer). | ||
@formExclude |
boolean | no | metaobjects-ui | When true, the field is omitted from generated forms. Inert on fields for which no form is generated (e.g. projection/derived fields). | ||
@instruction |
string | no | metaobjects-prompt | FR-010: a short instruction for this field, shown in the generated output-format prompt fragment. | ||
@localTime |
boolean | no | metaobjects-db | When true, the timestamp is a naive wall-clock value with no timezone (Postgres timestamp without time zone); absent/false (the default) = an absolute instant (timestamptz). ADR-0036 Wave 2 — replaces the retired @dbColumnType: timestamp_with_tz escape hatch. |
||
@mutability |
string | no | readWrite, writeOnce, readOnly |
metaobjects-core-types | FR-037 R1: who may write this field, and when. 'readWrite' (the default when absent) — the caller may set it on create and change it on update. 'writeOnce' — the caller sets it on create; it is excluded from the update shape thereafter, so a value presented on PATCH is ignored rather than rejected. 'readOnly' — nobody writes it: codegen emits no setter / writable property, the persistence layer skips the column on INSERT/UPDATE, and Zod/Pydantic/class-validator schemas omit it from input variants; the value is populated by the database (computed column, default expression, trigger), by replication, or by another external owner. The three are mutually exclusive modes of ONE axis — who may write, and when — so the illegal pair is unrepresentable and inheritance has a total order: a subtype may TIGHTEN an inherited mode (readWrite < writeOnce < readOnly) and never loosen it (ERR_MUTABILITY_DOWNGRADE). Pairing a non-readWrite mode with @autoSet is ERR_MUTABILITY_AUTOSET_CONFLICT: @autoSet already says the SERVER supplies the value, which is a different axis from who may write it. | |
@required |
boolean | no | metaobjects-core-types | When true, the field is NOT NULL. Equivalent to attaching a validator.required child. On a non-array string, generated wire-tier input validation (create/patch) additionally rejects the empty string by default — whitespace is accepted — unless an explicit validator.length @min: 0 opts back to presence-only. In-process read models never enforce this at construction. | ||
@sortable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD sort allowlists. Inherits from @filterable by default; set false to opt out. | ||
@sortableDefaultOrder |
string | no | asc, desc |
metaobjects-ui | Direction a sort takes when it names this field but omits the order: a ?sort= |
|
@unique |
boolean | no | metaobjects-core-types | When true, the field gets a column-level UNIQUE constraint. | ||
@xmlText |
boolean | no | metaobjects-prompt | When true, this field receives its element's XML TEXT CONTENT during tolerant extract (JAXB @XmlValue / Jackson @JacksonXmlText / .NET [XmlText]) instead of a same-named child. No effect when the eliciting prompt's @responseFormat is json. |
Allowed children
origin.*— 0..*validator.*— 0..*view.*— 0..*
field.uri
A URI/URL string (ADR-0036/0037 — a concept with a native type + behavior, so a subtype not a @stringFormat). Binds to TS string (TS has no native URI type, same as field.uuid); other ports bind to their native URI type (Java java.net.URI, C# System.Uri, Python urllib.parse, Kotlin java.net.URI) and parse scheme/authority/path. DB column is text (Postgres has no uri type). Codegen emits a URL/URI validator (TS Zod z.string().url()). v1 ships WITHOUT @kind — the native type subsumes url/urn; @kind is reserved for a later url|urn value-constraint.
Owning provider: metaobjects-core-types
When to use: A field holds a URL or URI. Use it for a typed URI column + URL validation instead of a plain string.
Attributes
| Attribute | Type | Required | Default | Allowed values | Provider | Description |
|---|---|---|---|---|---|---|
@column |
string | no | metaobjects-db | Physical column name for this field on an rdb source. Defaults to the field name via columnNamingStrategy. | ||
@db.indexed |
boolean | no | metaobjects-db | When true, suppress the @filterable-without-index Loader warning (the field is indexed by other means). | ||
@dbColumnType |
string | no | uuid, jsonb |
metaobjects-db | Physical DB column-type override (ADR-0013 escape hatch). Legal values are uuid | jsonb, both on field.string (uuid = native Postgres uuid column over a string-typed field; jsonb = genuinely-open JSON column). The logical field type and its native binding are unchanged. Native SQL arrays (uuid[]/text[]) are NOT declared here — they are derived from a field subtype + isArray (ADR-0036 Wave 1). The retired timestamp_with_tz value is gone — timezone-awareness lives in field.timestamp (instant by default) + @localTime (the naive opt-out), per ADR-0036 Wave 2. | |
@default |
any | no | metaobjects-core-types | Default value applied to the column when no value is supplied. Its type follows the field's own subtype (string / boolean / number / ...). Converted at consumption time via MetaField.defaultValue(). | ||
@example |
string | no | metaobjects-prompt | FR-010: an example value for this field, shown in the generated output-format prompt fragment. | ||
@filterable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD filter allowlists (Project D filter layer). | ||
@formExclude |
boolean | no | metaobjects-ui | When true, the field is omitted from generated forms. Inert on fields for which no form is generated (e.g. projection/derived fields). | ||
@instruction |
string | no | metaobjects-prompt | FR-010: a short instruction for this field, shown in the generated output-format prompt fragment. | ||
@lenient |
boolean | no | metaobjects-core-types | #234: opt this field out of strict well-formedness enforcement. When true, codegen binds a plain string (no URL/IP validator, no native URI/InetAddress type; field.inet uses a text column, not the native inet type) so a not-strictly-valid value round-trips unchanged. Default (absent/false) is strict: an absolute-scheme URI / an IPv4-or-IPv6 literal. | ||
@mutability |
string | no | readWrite, writeOnce, readOnly |
metaobjects-core-types | FR-037 R1: who may write this field, and when. 'readWrite' (the default when absent) — the caller may set it on create and change it on update. 'writeOnce' — the caller sets it on create; it is excluded from the update shape thereafter, so a value presented on PATCH is ignored rather than rejected. 'readOnly' — nobody writes it: codegen emits no setter / writable property, the persistence layer skips the column on INSERT/UPDATE, and Zod/Pydantic/class-validator schemas omit it from input variants; the value is populated by the database (computed column, default expression, trigger), by replication, or by another external owner. The three are mutually exclusive modes of ONE axis — who may write, and when — so the illegal pair is unrepresentable and inheritance has a total order: a subtype may TIGHTEN an inherited mode (readWrite < writeOnce < readOnly) and never loosen it (ERR_MUTABILITY_DOWNGRADE). Pairing a non-readWrite mode with @autoSet is ERR_MUTABILITY_AUTOSET_CONFLICT: @autoSet already says the SERVER supplies the value, which is a different axis from who may write it. | |
@required |
boolean | no | metaobjects-core-types | When true, the field is NOT NULL. Equivalent to attaching a validator.required child. On a non-array string, generated wire-tier input validation (create/patch) additionally rejects the empty string by default — whitespace is accepted — unless an explicit validator.length @min: 0 opts back to presence-only. In-process read models never enforce this at construction. | ||
@sortable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD sort allowlists. Inherits from @filterable by default; set false to opt out. | ||
@sortableDefaultOrder |
string | no | asc, desc |
metaobjects-ui | Direction a sort takes when it names this field but omits the order: a ?sort= |
|
@unique |
boolean | no | metaobjects-core-types | When true, the field gets a column-level UNIQUE constraint. | ||
@xmlText |
boolean | no | metaobjects-prompt | When true, this field receives its element's XML TEXT CONTENT during tolerant extract (JAXB @XmlValue / Jackson @JacksonXmlText / .NET [XmlText]) instead of a same-named child. No effect when the eliciting prompt's @responseFormat is json. |
Allowed children
origin.*— 0..*validator.*— 0..*view.*— 0..*
field.uuid
Logical UUID identity scalar. A bare scalar (no required attrs, no loader value-validation) — binds to TS string (no native UUID type); DB column is Postgres-native uuid.
Owning provider: metaobjects-core-types
When to use: A key or external identifier is a UUID. Use it for a typed UUID column instead of a plain string.
Attributes
| Attribute | Type | Required | Default | Allowed values | Provider | Description |
|---|---|---|---|---|---|---|
@column |
string | no | metaobjects-db | Physical column name for this field on an rdb source. Defaults to the field name via columnNamingStrategy. | ||
@db.indexed |
boolean | no | metaobjects-db | When true, suppress the @filterable-without-index Loader warning (the field is indexed by other means). | ||
@dbColumnType |
string | no | uuid, jsonb |
metaobjects-db | Physical DB column-type override (ADR-0013 escape hatch). Legal values are uuid | jsonb, both on field.string (uuid = native Postgres uuid column over a string-typed field; jsonb = genuinely-open JSON column). The logical field type and its native binding are unchanged. Native SQL arrays (uuid[]/text[]) are NOT declared here — they are derived from a field subtype + isArray (ADR-0036 Wave 1). The retired timestamp_with_tz value is gone — timezone-awareness lives in field.timestamp (instant by default) + @localTime (the naive opt-out), per ADR-0036 Wave 2. | |
@default |
any | no | metaobjects-core-types | Default value applied to the column when no value is supplied. Its type follows the field's own subtype (string / boolean / number / ...). Converted at consumption time via MetaField.defaultValue(). | ||
@example |
string | no | metaobjects-prompt | FR-010: an example value for this field, shown in the generated output-format prompt fragment. | ||
@filterable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD filter allowlists (Project D filter layer). | ||
@formExclude |
boolean | no | metaobjects-ui | When true, the field is omitted from generated forms. Inert on fields for which no form is generated (e.g. projection/derived fields). | ||
@instruction |
string | no | metaobjects-prompt | FR-010: a short instruction for this field, shown in the generated output-format prompt fragment. | ||
@mutability |
string | no | readWrite, writeOnce, readOnly |
metaobjects-core-types | FR-037 R1: who may write this field, and when. 'readWrite' (the default when absent) — the caller may set it on create and change it on update. 'writeOnce' — the caller sets it on create; it is excluded from the update shape thereafter, so a value presented on PATCH is ignored rather than rejected. 'readOnly' — nobody writes it: codegen emits no setter / writable property, the persistence layer skips the column on INSERT/UPDATE, and Zod/Pydantic/class-validator schemas omit it from input variants; the value is populated by the database (computed column, default expression, trigger), by replication, or by another external owner. The three are mutually exclusive modes of ONE axis — who may write, and when — so the illegal pair is unrepresentable and inheritance has a total order: a subtype may TIGHTEN an inherited mode (readWrite < writeOnce < readOnly) and never loosen it (ERR_MUTABILITY_DOWNGRADE). Pairing a non-readWrite mode with @autoSet is ERR_MUTABILITY_AUTOSET_CONFLICT: @autoSet already says the SERVER supplies the value, which is a different axis from who may write it. | |
@required |
boolean | no | metaobjects-core-types | When true, the field is NOT NULL. Equivalent to attaching a validator.required child. On a non-array string, generated wire-tier input validation (create/patch) additionally rejects the empty string by default — whitespace is accepted — unless an explicit validator.length @min: 0 opts back to presence-only. In-process read models never enforce this at construction. | ||
@sortable |
boolean | no | metaobjects-ui | When true, the field is exposed in generated CRUD sort allowlists. Inherits from @filterable by default; set false to opt out. | ||
@sortableDefaultOrder |
string | no | asc, desc |
metaobjects-ui | Direction a sort takes when it names this field but omits the order: a ?sort= |
|
@unique |
boolean | no | metaobjects-core-types | When true, the field gets a column-level UNIQUE constraint. | ||
@xmlText |
boolean | no | metaobjects-prompt | When true, this field receives its element's XML TEXT CONTENT during tolerant extract (JAXB @XmlValue / Jackson @JacksonXmlText / .NET [XmlText]) instead of a same-named child. No effect when the eliciting prompt's @responseFormat is json. |
Allowed children
origin.*— 0..*validator.*— 0..*view.*— 0..*