Relations & embeds¶
Relation
dataclass
¶
Relation(
join: Literal["left", "inner"] = "left",
fk: str | None = None,
through: str | None = None,
filter: dict[str, Any] | None = None,
)
Metadata describing a relation embedded into a SupabaseModel field.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
join
|
Literal['left', 'inner']
|
|
'left'
|
fk
|
str | None
|
Foreign-key constraint name for disambiguation. PostgREST uses
|
None
|
through
|
str | None
|
Junction-table or FK hint when PostgREST can't auto-resolve
the relationship. Same syntax slot as |
None
|
filter
|
dict[str, Any] | None
|
Per-relation filter dict (e.g. |
None
|