ModelReverseRelationInfo class

Represents information about a "reverse" relationship from another table to this one.

This is used to model one-to-many or many-to-many relationships from the "one" side or from one side of a join table.

For example, if an Author can have many Books, and Book has an author_id foreign key, then Author model would have a ModelReverseRelationInfo describing its list of books.

Constructors

ModelReverseRelationInfo.new({required String fieldNameInThisModel, required String referencingTableOriginalName, required String foreignKeyColumnInReferencingTable})
Creates an instance of ModelReverseRelationInfo.
ModelReverseRelationInfo.fromJson(Map<String, dynamic> json)
Creates a ModelReverseRelationInfo instance from a JSON map (deserialization).
factory

Properties

fieldNameInThisModel String
The name of the field in the current model class that will hold the list of related items.
final
foreignKeyColumnInReferencingTable String
The name of the foreign key column in the referencingTableOriginalName that points back to this model's table.
final
hashCode int
The hash code for this object.
no setterinherited
referencingTableOriginalName String
The original database name of the table that references this model (the "many" side).
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
toJson() Map<String, dynamic>
Converts this ModelReverseRelationInfo instance to a JSON map for serialization.
toString() String
A string representation of this object.
override

Operators

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