<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/sqlalchemy.git/lib/sqlalchemy/orm, branch rel_1_4</title>
<subtitle>github.com: zzzeek/sqlalchemy.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/'/>
<entry>
<title>do not allow non-cache-key entity objects in annotations</title>
<updated>2023-04-30T18:53:31+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2023-04-30T17:56:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=13752f00f30f369de8a51859e78d79b06601762c'/>
<id>13752f00f30f369de8a51859e78d79b06601762c</id>
<content type='text'>
Fixed critical caching issue where combination of :func:`_orm.aliased()`
:func:`_sql.case` and :func:`_hybrid.hybrid_property` expressions would
cause a cache key mismatch, leading to cache keys that held onto the actual
:func:`_orm.aliased` object while also not matching each other, filling up
the cache.

Fixes: #9728
Change-Id: I700645b5629a81a0104cf923db72a7421fa43ff4
(cherry picked from commit 4d69d83530666f9aaf3fb327d8c63110ef5e7ff5)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed critical caching issue where combination of :func:`_orm.aliased()`
:func:`_sql.case` and :func:`_hybrid.hybrid_property` expressions would
cause a cache key mismatch, leading to cache keys that held onto the actual
:func:`_orm.aliased` object while also not matching each other, filling up
the cache.

Fixes: #9728
Change-Id: I700645b5629a81a0104cf923db72a7421fa43ff4
(cherry picked from commit 4d69d83530666f9aaf3fb327d8c63110ef5e7ff5)
</pre>
</div>
</content>
</entry>
<entry>
<title>dont assume _compile_options are present</title>
<updated>2023-04-17T14:21:51+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2023-04-17T14:16:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=d519bca7f953a0520cda79504dbc019e74e87b28'/>
<id>d519bca7f953a0520cda79504dbc019e74e87b28</id>
<content type='text'>
Fixed bug where various ORM-specific getters such as
:attr:`.ORMExecuteState.is_column_load`,
:attr:`.ORMExecuteState.is_relationship_load`,
:attr:`.ORMExecuteState.loader_strategy_path` etc. would throw an
``AttributeError`` if the SQL statement itself were a "compound select"
such as a UNION.

Fixes: #9634
Change-Id: Ia37df5d6f89d6534d69237dcab294bd849ece28b
(cherry picked from commit 89608ccd3f5e5796d578e9a39201f7c5c45a61fe)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed bug where various ORM-specific getters such as
:attr:`.ORMExecuteState.is_column_load`,
:attr:`.ORMExecuteState.is_relationship_load`,
:attr:`.ORMExecuteState.loader_strategy_path` etc. would throw an
``AttributeError`` if the SQL statement itself were a "compound select"
such as a UNION.

Fixes: #9634
Change-Id: Ia37df5d6f89d6534d69237dcab294bd849ece28b
(cherry picked from commit 89608ccd3f5e5796d578e9a39201f7c5c45a61fe)
</pre>
</div>
</content>
</entry>
<entry>
<title>consider aliased mappers in cycles also</title>
<updated>2023-04-02T18:27:58+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2023-04-02T18:24:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=1aef8e75a69319469d3b447422b8cdee2a1cf894'/>
<id>1aef8e75a69319469d3b447422b8cdee2a1cf894</id>
<content type='text'>
Fixed endless loop which could occur when using "relationship to aliased
class" feature and also indicating a recursive eager loader such as
``lazy="selectinload"`` in the loader, in combination with another eager
loader on the opposite side. The check for cycles has been fixed to include
aliased class relationships.

Fixes: #9590
Change-Id: I8d340882f040ff9289c209bedd8fbdfd7186f944
(cherry picked from commit e79ab08165e01dc7af50fcffadb31468ace51b6c)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed endless loop which could occur when using "relationship to aliased
class" feature and also indicating a recursive eager loader such as
``lazy="selectinload"`` in the loader, in combination with another eager
loader on the opposite side. The check for cycles has been fixed to include
aliased class relationships.

Fixes: #9590
Change-Id: I8d340882f040ff9289c209bedd8fbdfd7186f944
(cherry picked from commit e79ab08165e01dc7af50fcffadb31468ace51b6c)
</pre>
</div>
</content>
</entry>
<entry>
<title>Add separate version notes for scalars</title>
<updated>2023-02-27T13:18:41+00:00</updated>
<author>
<name>Grey Li</name>
<email>withlihui@gmail.com</email>
</author>
<published>2023-02-26T10:56:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=4878ede0d921bb03758b0c79293bf23b6e248c49'/>
<id>4878ede0d921bb03758b0c79293bf23b6e248c49</id>
<content type='text'>
Add separate 1.4.24 and 1.4.26 version notes for the .scalars method;
this covers Session, scoped_session, AsyncSession, async_scoped_session
as the "scoped" versions did not have the method added until 1.4.26
as part of :ticket:`7103`.

Also indicate scoped_session as ``sqlalchemy.orm.scoped_session`` in
docs rather than ``sqlalchemy.orm.scoping.scoped_session``.  This is
also happening in I77da54891860095edcb1f0625ead99fee89bd76f separately,
as both changesets refer to scoped_session without using ".scoping".

References: #7103
Closes: #9371
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9371
Pull-request-sha: 61132230cc6e897ab61beff25d98b19a4c0aefd0

Change-Id: I84c8b1aad752db124cfee6bc8516f6eed7ba2faf
(cherry picked from commit ff97b9ab5e59283f684edac9a075702c43e8a4c1)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add separate 1.4.24 and 1.4.26 version notes for the .scalars method;
this covers Session, scoped_session, AsyncSession, async_scoped_session
as the "scoped" versions did not have the method added until 1.4.26
as part of :ticket:`7103`.

Also indicate scoped_session as ``sqlalchemy.orm.scoped_session`` in
docs rather than ``sqlalchemy.orm.scoping.scoped_session``.  This is
also happening in I77da54891860095edcb1f0625ead99fee89bd76f separately,
as both changesets refer to scoped_session without using ".scoping".

References: #7103
Closes: #9371
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9371
Pull-request-sha: 61132230cc6e897ab61beff25d98b19a4c0aefd0

Change-Id: I84c8b1aad752db124cfee6bc8516f6eed7ba2faf
(cherry picked from commit ff97b9ab5e59283f684edac9a075702c43e8a4c1)
</pre>
</div>
</content>
</entry>
<entry>
<title>apply changelog note for change of column loader options</title>
<updated>2023-01-16T21:24:53+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2023-01-16T21:02:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=1762c40490182fc511b71f5044f7252e2937162b'/>
<id>1762c40490182fc511b71f5044f7252e2937162b</id>
<content type='text'>
Change-Id: Ib9a69e20420e1fda755f4533c5f90bc08ba11b48
References: #8879
References: #9101
(cherry picked from commit 5e6cb26a017fb72bc3f925194c6f8c1eda968fbe)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Ib9a69e20420e1fda755f4533c5f90bc08ba11b48
References: #8879
References: #9101
(cherry picked from commit 5e6cb26a017fb72bc3f925194c6f8c1eda968fbe)
</pre>
</div>
</content>
</entry>
<entry>
<title>remove misleading line in post_update</title>
<updated>2023-01-09T17:41:37+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2023-01-09T17:38:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=13a5e3ac1ca93e09535f026fc8b9ce36dfbeeb14'/>
<id>13a5e3ac1ca93e09535f026fc8b9ce36dfbeeb14</id>
<content type='text'>
this UPDATE refers to the unit of work's need to consider this
additional UPDATE as a dependency and not an actual UPDATE statement.

Change-Id: I2a520af21ebf96b45c431efa898d4e7683a5bc2d
References: #9066
References: #1063
(cherry picked from commit 2ef4b449a7709ecab45e926f0e8d0dd398fd12db)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this UPDATE refers to the unit of work's need to consider this
additional UPDATE as a dependency and not an actual UPDATE statement.

Change-Id: I2a520af21ebf96b45c431efa898d4e7683a5bc2d
References: #9066
References: #1063
(cherry picked from commit 2ef4b449a7709ecab45e926f0e8d0dd398fd12db)
</pre>
</div>
</content>
</entry>
<entry>
<title>happy new year 2023</title>
<updated>2023-01-03T17:50:29+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2023-01-03T17:50:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=4f5970525403c98d46ed1a60f7816bc413a8c523'/>
<id>4f5970525403c98d46ed1a60f7816bc413a8c523</id>
<content type='text'>
Change-Id: I14db8e9c69a832b0f5dae8036db3c0a70bb49edd
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I14db8e9c69a832b0f5dae8036db3c0a70bb49edd
</pre>
</div>
</content>
</entry>
<entry>
<title>improve column targeting issues with query_expression</title>
<updated>2022-11-26T15:15:04+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2022-11-25T21:49:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=93afb76519380bb86fe5ecf62e75ddfd62c337e4'/>
<id>93afb76519380bb86fe5ecf62e75ddfd62c337e4</id>
<content type='text'>
Fixed issues in :func:`_orm.with_expression` where expressions that were
composed of columns within a subquery being SELECTed from, or when using
``.from_statement()``, would not render correct SQL **if** the expression
had a label name that matched the attribute which used
:func:`_orm.query_expression`, even when :func:`_orm.query_expression` had
no default expression. For the moment, if the :func:`_orm.query_expression`
**does** have a default expression, that label name is still used for that
default, and an additional label with the same name will be ignored.
Overall, this case is pretty thorny so further adjustments might be
warranted.

Fixes: #8881
Change-Id: Ie939b1470cb2e824717384be65f4cd8edd619942
(cherry picked from commit 474326e87038f997fb9423c56379b8ba19a5e43b)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed issues in :func:`_orm.with_expression` where expressions that were
composed of columns within a subquery being SELECTed from, or when using
``.from_statement()``, would not render correct SQL **if** the expression
had a label name that matched the attribute which used
:func:`_orm.query_expression`, even when :func:`_orm.query_expression` had
no default expression. For the moment, if the :func:`_orm.query_expression`
**does** have a default expression, that label name is still used for that
default, and an additional label with the same name will be ignored.
Overall, this case is pretty thorny so further adjustments might be
warranted.

Fixes: #8881
Change-Id: Ie939b1470cb2e824717384be65f4cd8edd619942
(cherry picked from commit 474326e87038f997fb9423c56379b8ba19a5e43b)
</pre>
</div>
</content>
</entry>
<entry>
<title>add "merge" to viewonly cascades; propagate NO_RAISE when merging</title>
<updated>2022-11-24T15:15:45+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2022-11-23T15:58:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=36914ae33a9d3357c7ad2d219e5af1031891be3c'/>
<id>36914ae33a9d3357c7ad2d219e5af1031891be3c</id>
<content type='text'>
Fixed bug where :meth:`_orm.Session.merge` would fail to preserve the
current loaded contents of relationship attributes that were indicated with
the :paramref:`_orm.relationship.viewonly` parameter, thus defeating
strategies that use :meth:`_orm.Session.merge` to pull fully loaded objects
from caches and other similar techniques. In a related change, fixed issue
where an object that contains a loaded relationship that was nonetheless
configured as ``lazy='raise'`` on the mapping would fail when passed to
:meth:`_orm.Session.merge`; checks for "raise" are now suspended within
the merge process assuming the :paramref:`_orm.Session.merge.load`
parameter remains at its default of ``True``.

Overall, this is a behavioral adjustment to a change introduced in the 1.4
series as of :ticket:`4994`, which took "merge" out of the set of cascades
applied by default to "viewonly" relationships. As "viewonly" relationships
aren't persisted under any circumstances, allowing their contents to
transfer during "merge" does not impact the persistence behavior of the
target object. This allows :meth:`_orm.Session.merge` to correctly suit one
of its use cases, that of adding objects to a :class:`.Session` that were
loaded elsewhere, often for the purposes of restoring from a cache.

Fixes: #8862
Change-Id: I8731c7810460e6a71f8bf5e8ded59142b9b02956
(cherry picked from commit 1e009bf086a42134190030f07068bc463e9a9794)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed bug where :meth:`_orm.Session.merge` would fail to preserve the
current loaded contents of relationship attributes that were indicated with
the :paramref:`_orm.relationship.viewonly` parameter, thus defeating
strategies that use :meth:`_orm.Session.merge` to pull fully loaded objects
from caches and other similar techniques. In a related change, fixed issue
where an object that contains a loaded relationship that was nonetheless
configured as ``lazy='raise'`` on the mapping would fail when passed to
:meth:`_orm.Session.merge`; checks for "raise" are now suspended within
the merge process assuming the :paramref:`_orm.Session.merge.load`
parameter remains at its default of ``True``.

Overall, this is a behavioral adjustment to a change introduced in the 1.4
series as of :ticket:`4994`, which took "merge" out of the set of cascades
applied by default to "viewonly" relationships. As "viewonly" relationships
aren't persisted under any circumstances, allowing their contents to
transfer during "merge" does not impact the persistence behavior of the
target object. This allows :meth:`_orm.Session.merge` to correctly suit one
of its use cases, that of adding objects to a :class:`.Session` that were
loaded elsewhere, often for the purposes of restoring from a cache.

Fixes: #8862
Change-Id: I8731c7810460e6a71f8bf5e8ded59142b9b02956
(cherry picked from commit 1e009bf086a42134190030f07068bc463e9a9794)
</pre>
</div>
</content>
</entry>
<entry>
<title>Explicitly state what happens if `order_by` is called more than once. (#8791)</title>
<updated>2022-11-14T21:12:43+00:00</updated>
<author>
<name>Eitan Mosenkis</name>
<email>eitan@mosenkis.net</email>
</author>
<published>2022-11-14T21:11:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=b5ee0c7ff566291ce5823ba3e0ea624946c966b5'/>
<id>b5ee0c7ff566291ce5823ba3e0ea624946c966b5</id>
<content type='text'>
* Explicitly state what happens if `order_by` is called more than once.

The existing docs cover how to clear existing `order_by` clauses but don't actually describe the behavior of calling `order_by` multiple times with different clauses.

* Also update Select.order_by.

(cherry picked from commit 9237bf15e612ba82555444751bd69dc2a831e7f4)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Explicitly state what happens if `order_by` is called more than once.

The existing docs cover how to clear existing `order_by` clauses but don't actually describe the behavior of calling `order_by` multiple times with different clauses.

* Also update Select.order_by.

(cherry picked from commit 9237bf15e612ba82555444751bd69dc2a831e7f4)
</pre>
</div>
</content>
</entry>
</feed>
