summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2023-04-12 21:21:36 +0000
committerGerrit Code Review <gerrit@bbpush.zzzcomputing.com>2023-04-12 21:21:36 +0000
commit53be3fc70a44d34fda1ffddcf9d67473d3de50b4 (patch)
treefbadb6bb7d078ad6041224270f11973232952b24 /doc
parent107ec58bdfbcbb09f40d92590f8197ffa683a925 (diff)
parent9f43b10e9014e694cb89fe2899dc52f602bf2197 (diff)
downloadsqlalchemy-53be3fc70a44d34fda1ffddcf9d67473d3de50b4.tar.gz
Merge "establish column_property and query_expression as readonly from a dc perspective" into main
Diffstat (limited to 'doc')
-rw-r--r--doc/build/changelog/unreleased_20/9628.rst29
-rw-r--r--doc/build/orm/declarative_tables.rst4
2 files changed, 31 insertions, 2 deletions
diff --git a/doc/build/changelog/unreleased_20/9628.rst b/doc/build/changelog/unreleased_20/9628.rst
new file mode 100644
index 000000000..0d9368349
--- /dev/null
+++ b/doc/build/changelog/unreleased_20/9628.rst
@@ -0,0 +1,29 @@
+.. change::
+ :tags: bug, orm
+ :tickets: 9628
+
+ Fixed bug in ORM Declarative Dataclasses where the
+ :func:`_orm.queryable_attribute` and :func:`_orm.column_property`
+ constructs, which are documented as read-only constructs in the context of
+ a Declarative mapping, could not be used with a
+ :class:`_orm.MappedAsDataclass` class without adding ``init=False``, which
+ in the case of :func:`_orm.queryable_attribute` was not possible as no
+ ``init`` parameter was included. These constructs have been modified from a
+ dataclass perspective to be assumed to be "read only", setting
+ ``init=False`` by default and no longer including them in the pep-681
+ constructor. The dataclass parameters for :func:`_orm.column_property`
+ ``init``, ``default``, ``default_factory``, ``kw_only`` are now deprecated;
+ these fields don't apply to :func:`_orm.column_property` as used in a
+ Declarative dataclasses configuration where the construct would be
+ read-only. Also added read-specific parameter
+ :paramref:`_orm.queryable_attribute.compare` to
+ :func:`_orm.queryable_attribute`; :paramref:`_orm.queryable_attribute.repr`
+ was already present.
+
+
+
+.. change::
+ :tags: bug, orm
+
+ Added missing :paramref:`_orm.mapped_column.active_history` parameter
+ to :func:`_orm.mapped_column` construct.
diff --git a/doc/build/orm/declarative_tables.rst b/doc/build/orm/declarative_tables.rst
index d9a11087d..0ee40cd07 100644
--- a/doc/build/orm/declarative_tables.rst
+++ b/doc/build/orm/declarative_tables.rst
@@ -1336,8 +1336,8 @@ declaration, typing tools will be able to match the attribute to the
.. _orm_imperative_table_column_options:
-Applying Load, Persistence and Mapping Options for Mapped Table Columns
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Applying Load, Persistence and Mapping Options for Imperative Table Columns
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The section :ref:`orm_declarative_column_options` reviewed how to set load
and persistence options when using the :func:`_orm.mapped_column` construct