RelationshipInfo
RelationshipInfo( name: str, type_name: str, fields: tuple[FieldInfo, ...], reading: str, is_property: bool, is_identity: bool, is_list: bool, is_input: bool, alt_readings: tuple[str, ...] = (),)Read-only view of a Relationship.
In the DSL, Property is a
subclass of Relationship —
a property is a single-valued (functional) relationship. This dataclass
represents both: use is_property to distinguish them.
The owning concept’s field is excluded from fields — only value and
key fields are included.
Attributes
Section titled “Attributes”RelationshipInfo.name: strRelationship or property name (e.g. "age", "customer").
Empty string for unnamed relationships.
.type_name
Section titled “.type_name”RelationshipInfo.type_name: strType of the last field — the value type for properties
("Integer"), or the target concept for relationships
("Order").
.fields
Section titled “.fields”RelationshipInfo.fields: tuple[FieldInfo, ...]Value/key fields, excluding the owning concept.
.reading
Section titled “.reading”RelationshipInfo.reading: strNatural-language description (e.g. "Person has Integer:age"
or "Customer placed Order"). Empty string if none declared.
.is_property
Section titled “.is_property”RelationshipInfo.is_property: boolTrue if this is a single-valued property (DSL Property),
False if multi-valued (DSL Relationship).
.is_identity
Section titled “.is_identity”RelationshipInfo.is_identity: boolTrue if this property is part of the concept’s unique key
(from identify_by=). Always False for non-properties.
.is_list
Section titled “.is_list”RelationshipInfo.is_list: boolTrue if the value field accepts a list of values.
.is_input
Section titled “.is_input”RelationshipInfo.is_input: boolTrue if the value field is a solver input (prescriptive models).
.alt_readings
Section titled “.alt_readings”RelationshipInfo.alt_readings: tuple[str, ...]Alternative phrasings from .alt() declarations.
Used By
Section titled “Used By”semantics > inspect ├── ConceptInfo └── ModelSchema