:tags: bug, schema
:tickets: 11317
- Fixed a bug that caused a syntax error when a function was specified
- to server_default when creating a column in MySQL or MariaDB.
- Pull request courtesy of huuya.
+ Fixed bug where SQL functions passed to
+ :paramref:`_schema.Column.server_default` would not be rendered with the
+ particular form of parenthesization now required by newer versions of MySQL
+ and MariaDB. Pull request courtesy of huuya.
:tickets: 11912
Fixed bug in ORM bulk update/delete where using RETURNING with bulk
- update/delete in combination with populate existing would fail to
- accommodate the populate_existing option.
+ update/delete in combination with ``populate_existing`` would fail to
+ accommodate the ``populate_existing`` option.
:paramref:`.mapped_column.server_onupdate`, or :class:`.Computed` are now
refreshed in ORM instances when running an ORM enabled UPDATE with WHERE
criteria, even if the statement does not use RETURNING or
- populate_existing.
+ ``populate_existing``.
:tags: usecase, orm
:tickets: 11923
- Added the dataclass field ``hash`` parameter to the orm field-like methods,
- like :meth:`_orn.mapped_column`, :meth:`_orm.relationship`, etc.
+ Added new parameter :paramref:`_orm.mapped_column.hash` to ORM constructs
+ such as :meth:`_orm.mapped_column`, :meth:`_orm.relationship`, etc.,
+ which is interpreted for ORM Native Dataclasses in the same way as other
+ dataclass-specific field parameters.
:tickets: 11961
Fixed bug in reflection of table comments where unrelated text would be
- returned if an entry in the pg_description table happened to share the
- same oid (objoid) as the table being reflected.
\ No newline at end of file
+ returned if an entry in the ``pg_description`` table happened to share the
+ same oid (objoid) as the table being reflected.
:tags: bug, orm
:tickets: 11965
- Fixed regression caused by fixes to joined eager loading in
- :ticket:`11449`, where a particular joinedload case could not be asserted
- correctly. We now have an example of that case so the assertion has been
- repaired to allow for it.
+ Fixed regression caused by fixes to joined eager loading in :ticket:`11449`
+ released in 2.0.31, where a particular joinedload case could not be
+ asserted correctly. We now have an example of that case so the assertion
+ has been repaired to allow for it.
:tags: mysql, performance
:tickets: 11975
- Improved foreign keys reflection logic in MySQL 8+ to use a better
- optimized query. The previous query could be quite slow in databases
- with a large number of columns.
+ Improved a query used for the MySQL 8 backend when reflecting foreign keys
+ to be better optimized. Previously, for a database that had millions of
+ columns across all tables, the query could be prohibitively slow; the query
+ has been reworked to take better advantage of existing indexes.
.. change::
- :tags: postgresql, usecase
+ :tags: postgresql, bug
:tickets: 11994
- Render bind cast for ``JSON`` and ``JSONB`` datatype on every dialect.
- Previously this was only enabled in a subset of dialects.
+ The :class:`.postgresql.JSON` and :class:`.postgresql.JSONB` datatypes will
+ now render a "bind cast" in all cases for all PostgreSQL backends,
+ including psycopg2, whereas previously it was only enabled for some
+ backends. This allows greater accuracy in allowing the database server to
+ recognize when a string value is to be interpreted as JSON.
loading by primary key and the primary key is NULL, skip loading" to take
into account the current setting for the
:paramref:`.orm.Mapper.allow_partial_pks` parameter. If this parameter is
- False, then a composite PK value that has partial NULL elements should also
- be skipped. This can apply to some composite overlapping foreign key
+ ``False``, then a composite PK value that has partial NULL elements should
+ also be skipped. This can apply to some composite overlapping foreign key
configurations.