Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions fixtures/conformance/ERROR-CODES.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"ERR_MALFORMED_YAML": "The YAML metadata input is not valid YAML, or cannot be desugared into canonical metadata.",
"ERR_INVALID_ORIGIN": "A field origin (passthrough/aggregate) declares an invalid path or attribute.",
"ERR_AMBIGUOUS_PATH": "FR-024 (ADR-0029): an implicit (omitted-@via) origin path is ambiguous — more than one single-hop relationship leads from the base entity to the @from/@of entity (the error names the candidates), or a projection's base entity cannot be derived because its fields extend multiple entities and no extended identity anchors the base.",
"ERR_AMBIGUOUS_REF": "Cross-package reference contract — a BARE reference (no `::`) names an object that exists in more than one package and none is in the referrer's own package. The reference is ambiguous; qualify it with the package (FQN). Applies to every object-ref-bearing attribute (@objectRef, @references, @from/@of/@via heads, extends, @payloadRef/@responseRef, @through).",
"ERR_ORIGIN_CARDINALITY": "FR-024 (ADR-0029): origin cardinality contract broken — a passthrough @via path crosses a to-many hop (row-multiplying passthrough — you meant aggregate), or an aggregate @via path is to-one at every hop (aggregating over a to-one path — you meant passthrough). Checked on explicit AND inferred paths.",
"ERR_EXTENDS_ORIGIN_MISMATCH": "FR-024 (ADR-0029 decision 7): a field declares both an entity-nested extends (shape lineage) and an origin.passthrough @from (data lineage) and they disagree — the resolved @from target is not the field's resolved extends target (nor anywhere on its extends chain). Host-agnostic (projections, entities, values). origin.aggregate is never judged (it computes something new); a top-level abstract extends target is never judged (shape-only reuse makes no lineage claim).",
"ERR_DERIVED_FIELD_NO_READ_SOURCE": "FR-024 (spec §7): an object.entity field carrying an origin.* child is derived (read-only) and must be providable — the entity must declare at least one source with a read-only @kind (view/materializedView/storedProc/tableFunction, e.g. a @role replica view beside the table primary). Table-only or source-less entities with origin-bearing fields error on the field. Projections and object.value hosts are exempt. Until the Phase-E B4b cutover removes view-primary entities, a read-only-kind PRIMARY source also counts as providable (legacy spelling).",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"errors": [
{
"code": "ERR_AMBIGUOUS_REF",
"source": {
"format": "resolved",
"files": [
"meta.sales.json"
],
"jsonPath": "$['metadata.root'].children[0]['object.entity'].children[4]['relationship.association']",
"referrer": "Order",
"target": "Customer"
}
}
],
"warnings": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"metadata.root": {
"package": "xpkg::crm",
"children": [
{
"object.entity": {
"name": "Customer",
"children": [
{
"source.rdb": {
"@table": "crm_customers"
}
},
{
"field.long": {
"name": "id"
}
},
{
"identity.primary": {
"name": "pk",
"@fields": [
"id"
]
}
}
]
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"metadata.root": {
"package": "xpkg::sales",
"children": [
{
"object.entity": {
"name": "Order",
"children": [
{
"source.rdb": {
"@table": "orders"
}
},
{
"field.long": {
"name": "id"
}
},
{
"field.long": {
"name": "customerId"
}
},
{
"identity.primary": {
"name": "pk",
"@fields": [
"id"
]
}
},
{
"relationship.association": {
"name": "customer",
"@cardinality": "one",
"@objectRef": "Customer"
}
}
]
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"metadata.root": {
"package": "xpkg::vendor",
"children": [
{
"object.entity": {
"name": "Customer",
"children": [
{
"source.rdb": {
"@table": "vendor_customers"
}
},
{
"field.long": {
"name": "id"
}
},
{
"identity.primary": {
"name": "pk",
"@fields": [
"id"
]
}
}
]
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["metaobjects-core-types","metaobjects-db"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"metadata.root": {
"package": "xpkg::home",
"children": [
{
"object.entity": {
"name": "Base",
"abstract": true,
"children": [
{
"field.long": {
"name": "id"
}
},
{
"field.string": {
"name": "homeOnly"
}
}
]
}
},
{
"object.entity": {
"name": "Gadget",
"extends": "Base",
"children": [
{
"field.long": {
"name": "id"
}
},
{
"field.string": {
"name": "homeOnly"
}
},
{
"source.rdb": {
"@table": "gadgets"
}
},
{
"field.string": {
"name": "label"
}
},
{
"identity.primary": {
"name": "pk",
"@fields": [
"id"
]
}
}
]
}
},
{
"object.entity": {
"name": "Base",
"abstract": true,
"children": [
{
"field.long": {
"name": "id"
}
},
{
"field.string": {
"name": "otherOnly"
}
}
]
}
}
]
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"metadata.root": {
"package": "xpkg::home",
"children": [
{
"object.entity": {
"name": "Base",
"abstract": true,
"children": [
{
"field.long": {
"name": "id"
}
},
{
"field.string": {
"name": "homeOnly"
}
}
]
}
},
{
"object.entity": {
"name": "Gadget",
"extends": "Base",
"children": [
{
"source.rdb": {
"@table": "gadgets"
}
},
{
"field.string": {
"name": "label"
}
},
{
"identity.primary": {
"name": "pk",
"@fields": [
"id"
]
}
}
]
}
},
{
"object.entity": {
"name": "Base",
"abstract": true,
"children": [
{
"field.long": {
"name": "id"
}
},
{
"field.string": {
"name": "otherOnly"
}
}
]
}
}
]
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"metadata.root": {
"package": "xpkg::home",
"children": [
{
"object.entity": {
"name": "Base",
"abstract": true,
"children": [
{
"field.long": {
"name": "id"
}
},
{
"field.string": {
"name": "homeOnly"
}
}
]
}
},
{
"object.entity": {
"name": "Gadget",
"extends": "Base",
"children": [
{
"source.rdb": {
"@table": "gadgets"
}
},
{
"field.string": {
"name": "label"
}
},
{
"identity.primary": {
"name": "pk",
"@fields": [
"id"
]
}
}
]
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"metadata.root": {
"package": "xpkg::other",
"children": [
{
"object.entity": {
"name": "Base",
"abstract": true,
"children": [
{
"field.long": {
"name": "id"
}
},
{
"field.string": {
"name": "otherOnly"
}
}
]
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["metaobjects-core-types","metaobjects-db"]
Loading
Loading