MCPcopy Create free account
hub / github.com/tortoise/tortoise-orm / ForeignKeyField

Function ForeignKeyField

tortoise/fields/relational.py:512–520  ·  view source on GitHub ↗
(
    to: type[Model] | str,
    related_name: str | None | Literal[False] = None,
    on_delete: OnDelete = CASCADE,
    db_constraint: bool = True,
    *,
    null: Literal[True],
    **kwargs: Any,
)

Source from the content-addressed store, hash-verified

510
511@overload
512def ForeignKeyField(
513 to: type[Model] | str,
514 related_name: str | None | Literal[False] = None,
515 on_delete: OnDelete = CASCADE,
516 db_constraint: bool = True,
517 *,
518 null: Literal[True],
519 **kwargs: Any,
520) -> ForeignKeyNullableRelation[MODEL]: ...
521
522
523@overload

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…