• Preparing search index...
  • The search index is not available
Documentation
  • Documentation
  • @sequelize/core
  • decorators-legacy
  • BelongsTo

Function BelongsTo

  • BelongsTo<SourceKey extends string, Target extends Model<any, any>>(
        target: MaybeForwardedModelStatic<Target>,
        optionsOrForeignKey:
            | SourceKey
            | Omit<BelongsToOptions<SourceKey, AttributeNames<Target>>, "as">,
    ): (source: Model, associationName: string) => void

    Type Parameters

    • SourceKey extends string
    • Target extends Model<any, any>

    Parameters

    • target: MaybeForwardedModelStatic<Target>
    • optionsOrForeignKey: SourceKey | Omit<BelongsToOptions<SourceKey, AttributeNames<Target>>, "as">

    Returns (source: Model, associationName: string) => void

    • Defined in packages/core/src/decorators/legacy/associations.ts:99

Settings

Member Visibility
Documentation
  • Loading...

Generated using TypeDoc