@fluentity/core
    Preparing search index...

    Function HasMany

    • Decorator for creating a has-many relationship between models. Sets up a one-to-many relationship where a model has multiple related models.

      Parameters

      • model: () => Constructor<Model<any>>

        Factory function that returns the related model constructor

      • Optionalresource: string

        Optional custom resource name for the relation

      Returns PropertyDecoratorType

      A property decorator function

      class User {
      @HasMany(() => Post)
      posts: Post[];
      }