RelationInfo.oneToMany constructor
RelationInfo.oneToMany({})
Create a one-to-many relation (this model has many of target).
Implementation
factory RelationInfo.oneToMany({
required String name,
required String targetModel,
required String foreignKey,
List<String> references = const ['id'],
String? inverseRelation,
}) {
return RelationInfo(
name: name,
type: RelationType.oneToMany,
targetModel: targetModel,
foreignKey: foreignKey,
references: references,
inverseRelation: inverseRelation,
isOwner: false, // One side doesn't own FK
);
}