base
| FUNCTION | DESCRIPTION |
|---|---|
orm_model_to_dict |
Dump mapped-column attributes into a Python dictionary. |
Functions:
orm_model_to_dict(obj, *, include=None, exclude=None)
Dump mapped-column attributes into a Python dictionary.
This is a replacement of the SQLModel.model_dump method, which cannot
be used any more as of version 2.25.0.
Behavior: only mapped columns are included (never relationship()
attributes), and only columns that already have a concrete value in
__dict__ (i.e. loaded from the database, or explicitly assigned) are
included, omitting columns whose value is still pending a
server-side default on a not-yet-flushed instance.