ormar breaking changes
Updated December 4, 2026
On this page
Latest version 0.30.0, released November 16, 2026. Source repository
Its 0.28.0 release drops Python 3.10. Python end of life dates.
ormar 0.30.0 breaking changes
- Removed
ormar.models.mixins.relation_mixin.translate_list_to_dict
ormar.models.mixins.relation_mixin.translate_list_to_dict was removed in ormar 0.30.0 pypi.org - Removed
ormar.models.model.delete_template
ormar.models.model.delete_template was removed in ormar 0.30.0 pypi.org - Removed
ormar.models.model.pk_select_template
ormar.models.model.pk_select_template was removed in ormar 0.30.0 pypi.org - Removed
ormar.models.model.update_template
ormar.models.model.update_template was removed in ormar 0.30.0 pypi.org - Removed
ormar.QuerySet.build_write_statement
QuerySet.build_write_statement was removed in ormar 0.30.0 pypi.org - Removed
ormar.queryset.queryset.build_bulk_update
ormar.queryset.queryset.build_bulk_update was removed in ormar 0.30.0 pypi.org - Removed
ormar.queryset.queryset.expression_clause
ormar.queryset.queryset.expression_clause was removed in ormar 0.30.0 pypi.org - Removed
ormar.queryset.templates.build_bulk_update
ormar.queryset.templates.build_bulk_update was removed in ormar 0.30.0 pypi.org - Removed
ormar.queryset.templates.build_delete
ormar.queryset.templates.build_delete was removed in ormar 0.30.0 pypi.org - Removed
ormar.queryset.templates.build_pk_select
ormar.queryset.templates.build_pk_select was removed in ormar 0.30.0 pypi.org - Removed
ormar.queryset.templates.build_update
ormar.queryset.templates.build_update was removed in ormar 0.30.0 pypi.org - Removed
ormar.queryset.templates.delete_template
ormar.queryset.templates.delete_template was removed in ormar 0.30.0 pypi.org - Removed
ormar.queryset.templates.pk_select_template
ormar.queryset.templates.pk_select_template was removed in ormar 0.30.0 pypi.org - Removed
ormar.queryset.templates.update_template
ormar.queryset.templates.update_template was removed in ormar 0.30.0 pypi.org - Renamed
ormar.queryset.queryset.FilterQuery
Use ormar.queryset.write_statements.FilterQuery instead. pypi.org - Renamed
ormar.queryset.queryset.value_binds
Use ormar.queryset.write_statements.value_binds instead. pypi.org - Renamed
ormar.queryset.templates.writes.PrimaryKey
Use ormar.queryset.write_statements.PrimaryKey instead. pypi.org - Behavior changed
model_dump, save_related, get_pydantic and follow loading now choose relations from the loaded instances rather than a cached relation tree. Output is identical where the old tree was right. github.com - Behavior changed
Joined table aliases and column labels now carry a 10 hex digit hash instead of 6. Code that matches on raw SQL text must be updated. github.com - Behavior changed
get_pydantic
Nested relations now point to a named nested model per model, such as Book_nested, and nested names no longer have random suffixes. Use max_depth=1 to keep one level of nesting. github.com - Behavior changed
load_all
With follow=True, load_all now loads only forward foreign keys and one to one relations up to max_depth levels, default 5. Reverse and many to many relations need follow_reverse or select_related(). github.com - Behavior changed
ormar.Enum
values_callable, native_enum, create_constraint and other sqlalchemy.Enum options now reach the column type. Check generated DDL and stored data, since names written earlier are not read back with values_callable. github.com - Behavior changed
select_all
With follow=True, select_all now loads only forward foreign keys and one to one relations up to max_depth levels, default 5. Reverse and many to many relations need follow_reverse or select_related(). github.com - Behavior changed
values
Related fields selected by values() are now joined, so reverse or many to many relations can return more rows than before. github.com - Behavior changed
values_list
Related fields selected by values_list() are now joined, so reverse or many to many relations can return more rows than before. github.com - Signature changed
ormar.databases.connection.DialectRules.conflict_insert
Was def conflict_insert(self, *, table: sqlalchemy.Table, values: Dict[Any, Any], on_conflict: str, target: Tuple[str, ...], update_names: Tuple[str, ...], on_update: Tuple[str, ...], returning: bool) -> Executable; now def... pypi.org - Signature changed
ormar.databases.connection.QueryExecutor.fetch_all
Was async def fetch_all(self, query: Executable, params: Optional[Mapping[str, Any]] = None) -> List[Any]; now async def fetch_all(self, query: Executable, params: Optional[Mapping[str, Any]] = None, as_tuples: bool = False) -> List[Any]. pypi.org - Signature changed
ormar.databases.connection.QueryExecutor.fetch_one
Was async def fetch_one(self, query: Executable, params: Optional[Mapping[str, Any]] = None) -> Optional[Mapping[Any, Any]]; now async def fetch_one(self, query: Executable, params: Optional[Mapping[str, Any]] = None, as_tuples: bool =... pypi.org - Signature changed
ormar.databases.dialects.conflict_updates
Was def conflict_updates(*, table: sqlalchemy.Table, inserted: Any, update_names: Tuple[str, ...], on_update: Tuple[str, ...]) -> Dict[str, Any]; now def conflict_updates(*, table: sqlalchemy.Table, inserted: Any, update_names: Tuple[str... pypi.org - Signature changed
ormar.databases.native.adapters.DriverAdapter.fetch_all
Was async def fetch_all(self, raw: Any, bound: BoundStatement) -> List[Dict[str, Any]]; now async def fetch_all(self, raw: Any, bound: BoundStatement, as_tuples: bool = False) -> List[Any]. pypi.org - Signature changed
ormar.Enum.__new__
Was def __new__(cls, *, enum_class: type[E], **kwargs: Any) -> Self; now def __new__(cls, *, enum_class: type[E], store_values: bool = False, **kwargs: Any) -> Self. pypi.org - Signature changed
ormar.Integer.__new__
Was def __new__(cls, *, minimum: Optional[int] = None, maximum: Optional[int] = None, multiple_of: Optional[int] = None, **kwargs: Any) -> Self; now def __new__(cls, *, minimum: Optional[int] = None, maximum: Optional[int] = None... pypi.org - Signature changed
ormar.Model.load_all
Was async def load_all(self: T, follow: bool = False, exclude: Union[list, str, set, dict, None] = None, order_by: Union[list, str, None] = None) -> T; now async def load_all(self: T, follow: bool = False, exclude: Union[list, str, set... pypi.org - Signature changed
ormar.models.mixins.PydanticMixin.get_pydantic
Was @classmethod def get_pydantic(cls, *, include: Union[set, dict, None] = None, exclude: Union[set, dict, None] = None, flatten_fields: Union[set, list, str, tuple, dict, FieldAccessor, None] = None, flatten_all: bool = False) ->... pypi.org - Signature changed
ormar.OrmarConfig.__init__
Was def __init__(self, metadata: Optional[sqlalchemy.MetaData] = None, database: Optional[DatabaseConnection] = None, engine: Optional[AsyncEngine] = None, tablename: Optional[str] = None, schema: Optional[str] = None, comment... pypi.org - Signature changed
ormar.OrmarConfig.constraints
Was constraints: list[ColumnCollectionConstraint]; now constraints: list[TableConstraint]. pypi.org - Signature changed
ormar.OrmarConfig.copy
Was def copy(self, metadata: Optional[sqlalchemy.MetaData] = None, database: Optional[DatabaseConnection] = None, engine: Optional[AsyncEngine] = None, tablename: Optional[str] = None, schema: Union[str, None, PydanticUndefinedType] =... pypi.org - Signature changed
ormar.protocols.queryset_protocol.QuerysetProxy.create
Was async def create(self, *, on_conflict: Optional[Literal['ignore']] = None, **kwargs: Any) -> Optional[T]; now async def create(self, *, on_conflict: Optional[Literal['ignore', 'update']] = None, conflict_target: Optional[list[str]] =... pypi.org - Signature changed
ormar.protocols.queryset_protocol.QuerysetProxy.order_by
Was def order_by(self, columns: Union[list, str, OrderAction, RandomOrder]) -> QuerysetProxy[T]; now def order_by(self, columns: Union[list, str, OrderAction, RandomOrder, Random]) -> QuerysetProxy[T]. pypi.org - Signature changed
ormar.protocols.queryset_protocol.QuerysetProxy.select_all
Was def select_all(self, follow: bool = False) -> QuerysetProxy[T]; now def select_all(self, follow: bool = False, max_depth: Optional[int] = None, follow_reverse: Union[bool, int] = 0) -> QuerysetProxy[T]. pypi.org - Signature changed
ormar.queryset.actions.filter_action.expression_clause
Was def expression_clause(node: Any, columns: Mapping[str, QueryAction], slot: Optional[str], index: Optional[Iterator[int]] = None) -> Any; now def expression_clause(node: Any, columns: Mapping[str, QueryAction], slot: Optional[str]... pypi.org - Signature changed
ormar.queryset.actions.filter_action.expression_columns
Was def expression_columns(node: Any, model: type[Model]) -> dict[str, SelectAction]; now def expression_columns(node: Any, model: type[Model], upsert: bool = False) -> dict[str, SelectAction]. pypi.org - Signature changed
ormar.queryset.actions.select_action.expression_columns
Was def expression_columns(node: Any, model: type[Model]) -> dict[str, SelectAction]; now def expression_columns(node: Any, model: type[Model], upsert: bool = False) -> dict[str, SelectAction]. pypi.org - Signature changed
ormar.QuerySet.build_write_template
Was def build_write_template(self, kind: str, values: dict) -> StatementTemplate; now def build_write_template(self, statement: type[WriteStatement], values: dict) -> StatementTemplate. pypi.org - Signature changed
ormar.QuerySet.bulk_create
Was async def bulk_create(self, objects: list[T], on_conflict: Optional[Literal['ignore', 'update']] = None, conflict_target: Optional[list[str]] = None, update_fields: Optional[list[str]] = None) -> None; now async def bulk_create(self... pypi.org - Signature changed
ormar.QuerySet.create
Was async def create(self, *, on_conflict: Optional[Literal['ignore']] = None, **kwargs: Any) -> Optional[T]; now async def create(self, *, on_conflict: Optional[Literal['ignore', 'update']] = None, conflict_target: Optional[list[str]] =... pypi.org - Signature changed
ormar.queryset.expressions.expression_clause
Was def expression_clause(node: Any, columns: Mapping[str, QueryAction], slot: Optional[str], index: Optional[Iterator[int]] = None) -> Any; now def expression_clause(node: Any, columns: Mapping[str, QueryAction], slot: Optional[str]... pypi.org - Signature changed
ormar.QuerySet.order_by
Was def order_by(self, columns: Union[list, str, OrderAction, RandomOrder]) -> QuerySet[T]; now def order_by(self, columns: Union[list, str, OrderAction, RandomOrder, Random]) -> QuerySet[T]. pypi.org - Signature changed
ormar.queryset.queryset.expression_columns
Was def expression_columns(node: Any, model: type[Model]) -> dict[str, SelectAction]; now def expression_columns(node: Any, model: type[Model], upsert: bool = False) -> dict[str, SelectAction]. pypi.org - Signature changed
ormar.queryset.queryset.insert_statement
Was def insert_statement(model_cls: Type[Any], names: Tuple[str, ...], on_conflict: Optional[str] = None, conflict_target: Optional[Sequence[str]] = None, update_fields: Optional[Sequence[str]] = None, on_update: Tuple[str, ...] = ()... pypi.org
And 3 more in this version. Sign up to see every change
ormar 0.29.0 breaking changes
- Removed
ormar.databases.connection.AUTOCOMMIT_ENGINE_BACKENDS
ormar.databases.connection.AUTOCOMMIT_ENGINE_BACKENDS was removed in ormar 0.29.0 pypi.org - Removed
ormar.OrderAction.is_postgres_bool
OrderAction.is_postgres_bool was removed in ormar 0.29.0 pypi.org - Removed
ormar.queryset.actions.filter_action.prefixed_table
ormar.queryset.actions.filter_action.prefixed_table was removed in ormar 0.29.0 pypi.org - Removed
ormar.queryset.clause.FILTER_OPERATORS
ormar.queryset.clause.FILTER_OPERATORS was removed in ormar 0.29.0 pypi.org - Removed
ormar.queryset.queryset.insert_template
ormar.queryset.queryset.insert_template was removed in ormar 0.29.0 pypi.org - Behavior changed
filter
A filter on a field named like an operator, such as ne, must use __exact (for example ne__exact=1). A key that is only an operator, such as gt=1, now raises QueryDefinitionError. github.com - Signature changed
ormar.fields.foreign_key.key_dict_type
Was def key_dict_type(target: type[Model], fields: tuple[str, ...]) -> Any; now def key_dict_type(*, target: type[Model], fields: tuple[str, ...]) -> Any. pypi.org - Signature changed
ormar.fields.key_only.key_dict_type
Was def key_dict_type(target: type[Model], fields: tuple[str, ...]) -> Any; now def key_dict_type(*, target: type[Model], fields: tuple[str, ...]) -> Any. pypi.org - Signature changed
ormar.models.excludable.FieldAccessor
Was class FieldAccessor; now class FieldAccessor(Expression). pypi.org - Signature changed
ormar.models.metaclass.FieldAccessor
Was class FieldAccessor; now class FieldAccessor(Expression). pypi.org
And 20 more in this version. Sign up to see every change
ormar 0.28.0 breaking changes
- Removed
ormar now requires Python 3.11 or newer, so Python 3.10 can no longer be used. github.com - Removed
Model.ormar_config.pkname
Use ormar_config.pk.fields, which returns the field names of the primary key. github.com - Removed
model.pk_column
Use Model.ormar_config.pk.columns() to get the primary key columns. github.com - Removed
ormar.BaseField.constraints
Foreign keys are now built from field.link. pypi.org - Removed
ormar.BaseField.to_pk_only
Use field.to_key_only instead. pypi.org - Removed
ormar.fields.foreign_key.create_dummy_instance
Use ormar.fields.key_only.key_only_instance instead. pypi.org - Removed
ormar.fields.foreign_key.create_dummy_model
Use ormar.fields.key_only.key_only_model_type instead. pypi.org - Removed
ormar.fields.foreign_key.ForeignKeyConstraint
Foreign keys are now built from field.link. pypi.org - Removed
ormar.fields.foreign_key.ManyToManyField
ormar.fields.foreign_key.ManyToManyField was removed in ormar 0.28.0 pypi.org - Removed
ormar.fields.many_to_many.create_dummy_model
ormar.fields.many_to_many.create_dummy_model was removed in ormar 0.28.0 pypi.org
And 76 more in this version. Sign up to see every change
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.