RelationRepository
RelationRepository is a Repository object for association types. RelationRepository allows operating on associated data without loading the association. Based on RelationRepository, each association type has a corresponding derived implementation:
HasOneRepositoryHasManyRepositoryBelongsToRepositoryBelongsToManyRepository
Constructor
Signature
constructor(sourceCollection: Collection, association: string, sourceKeyValue: string | number)
Parameters
Base Class Properties
db: Database
Database object
sourceCollection
The Collection corresponding to the referencing relation in the association
targetCollection
The Collection corresponding to the referenced relation in the association
association
The association object in sequelize corresponding to the current association
associationField
The field in the collection corresponding to the current association
sourceKeyValue
The corresponding key value in the referencing relation

