Relate class Null safety

Metadata to configure property of ManagedObject as a foreign key column.

A property in a ManagedObject's table definition 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

Relate(Symbol inversePropertyName, {DeleteRule onDelete = DeleteRule.nullify, bool isRequired = false})
Creates an instance of this type.
const
Relate.deferred(DeleteRule onDelete, {bool isRequired = false})
const

Properties

hashCode int
The hash code for this object.
read-onlyinherited
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 DeleteRule
The delete rule to use when a related instance is deleted.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited