Page Contents

Home > @loopback/repository > referencesMany

referencesMany() function

Decorator for referencesMany


export declare function referencesMany<T extends Entity>(targetResolver: EntityResolver<T>, definition?: Partial<ReferencesManyDefinition>, propertyDefinition?: Partial<PropertyDefinition>): (decoratedTarget: Entity, decoratedKey: string) => void;


Parameter Type Description
targetResolver EntityResolver<T> A resolver function that returns the target model for a referencesMany relation
definition Partial<ReferencesManyDefinition> (Optional) Optional metadata for setting up a referencesMany relation
propertyDefinition Partial<PropertyDefinition> (Optional) Optional metadata for setting up the property


(decoratedTarget: Entity, decoratedKey: string) => void

A property decorator