Metadata for a ManagedObject property that requests the property be backed by a foreign key column in a database.

A property in a ManagedObject's persistent type with this metadata will map to a database column that has a foreign key reference to the related ManagedObject. Relationships are made up of two ManagedObjects, where each has a property that refers to the other. Only one of those properties may have this metadata. The property with this metadata resolves to a column in the database. The relationship property without this metadata resolves to a row or rows in the database.

Constructors

ManagedRelationship(Symbol inversePropertyName, { ManagedRelationshipDeleteRule onDelete: ManagedRelationshipDeleteRule.nullify, bool isRequired: false })

Creates an instance of this type.

const
ManagedRelationship.deferred(ManagedRelationshipDeleteRule onDelete, { bool isRequired: false })

const

Properties

inversePropertyName → Symbol

The symbol for the property in the related ManagedObject.

final
isDeferred → bool

read-only
isRequired → bool

Whether or not this relationship is required.

final
onDelete ManagedRelationshipDeleteRule

The delete rule to use when a related instance is deleted.

final
hashCode → int

The hash code for this object.

read-only, inherited
runtimeType → Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) → bool

The equality operator.

inherited

Methods

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
toString() → String

Returns a string representation of this object.

inherited