Type alias HasOneDefinition

HasOneDefinition: {
    discriminator?: undefined;
    foreignKey: string;
    model: string;
    polymorphic?: false;
    type: HAS_ONE;
}

The regular "hasOne" relation.

Type declaration

  • Optional discriminator?: undefined
  • foreignKey: string
  • model: string
  • Optional polymorphic?: false
  • type: HAS_ONE

Example

{
type: RelationType.HAS_ONE,
model: 'model',
foreignKey: 'modelId',
}

Generated using TypeDoc