ForeignKey class
Declares a foreign key on another Entity.
Constructors
-
ForeignKey({required List<
String> childColumns, required List<String> parentColumns, required Type entity, ForeignKeyAction onUpdate = ForeignKeyAction.noAction, ForeignKeyAction onDelete = ForeignKeyAction.noAction}) -
Declares a foreign key on another Entity.
const
Properties
-
childColumns
→ List<
String> -
The list of column names in the current Entity.
final
- entity → Type
-
The parent entity to reference.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- onDelete → ForeignKeyAction
-
ForeignKeyAction
Action to take when the parent Entity is deleted from the database.
final
- onUpdate → ForeignKeyAction
-
ForeignKeyAction
Action to take when the parent Entity is updated from the database.
final
-
parentColumns
→ List<
String> -
The list of column names in the parent Entity.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited