Type alias PolyHasOneDefinitionWithTargetKeys

PolyHasOneDefinitionWithTargetKeys: {
    discriminator: string;
    foreignKey: string;
    model: string;
    polymorphic: true;
    type: HAS_ONE;
}

The polymorphic "hasOne" relation with target relation keys.

Type declaration

  • discriminator: string
  • foreignKey: string
  • model: string
  • polymorphic: true
  • type: HAS_ONE

Example

{
type: RelationType.HAS_ONE,
model: 'model',
polymorphic: true,
foreignKey: 'referenceId',
discriminator: 'referenceType',
}

Generated using TypeDoc