• Preparing search index...
  • The search index is not available
Documentation
  • Documentation
  • @sequelize/core
  • index
  • isSameInitialModel

Function isSameInitialModel

  • isSameInitialModel(a: ModelStatic<any>, b: ModelStatic<any>): boolean

    Returns true if a & b are the same initial model, ignoring variants created by Model.withSchema, Model.withScope, and the like.

    The difference with doing a === b is that this method will also return true if one of the models is scoped, or a variant with a different schema.

    Parameters

    • a: ModelStatic<any>
    • b: ModelStatic<any>

    Returns boolean

    Example

    isSameInitialModel(a, a.withScope('myScope')) // true;
    
    • Defined in packages/core/src/utils/model-utils.ts:31

Settings

Member Visibility
Documentation
  • Loading...

Generated using TypeDoc