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

Function BelongsTo

  • BelongsTo<SourceKey, Target>(target, optionsOrForeignKey): ((source, associationName) => 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, associationName) => void)

      • (source, associationName): void
      • Parameters

        • source: Model<any, any>
        • associationName: string

        Returns void

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

Settings

Member Visibility

Theme

Documentation
  • Loading...

Generated using TypeDoc