<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/sqlalchemy.git/lib/sqlalchemy/orm, branch pr/318</title>
<subtitle>github.com: zzzeek/sqlalchemy.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/'/>
<entry>
<title>Restore object to the identity_map upon delete() unconditionally</title>
<updated>2016-10-27T13:51:50+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2016-10-27T13:51:50+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=e56a9d85acd165cfea08f9dc7e9d747054ce6fdb'/>
<id>e56a9d85acd165cfea08f9dc7e9d747054ce6fdb</id>
<content type='text'>
Fixed regression caused by :ticket:`2677` whereby calling
:meth:`.Session.delete` on an object that was already flushed as
deleted in that session would fail to set up the object in the
identity map (or reject the object), causing flush errors as the
object were in a state not accommodated by the unit of work.
The pre-1.1 behavior in this case has been restored, which is that
the object is put back into the identity map so that the DELETE
statement will be attempted again, which emits a warning that the number
of expected rows was not matched (unless the row were restored outside
of the session).

Change-Id: I9a8871f82cb1ebe67a7ad54d888d5ee835a9a40a
Fixes: #3839
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed regression caused by :ticket:`2677` whereby calling
:meth:`.Session.delete` on an object that was already flushed as
deleted in that session would fail to set up the object in the
identity map (or reject the object), causing flush errors as the
object were in a state not accommodated by the unit of work.
The pre-1.1 behavior in this case has been restored, which is that
the object is put back into the identity map so that the DELETE
statement will be attempted again, which emits a warning that the number
of expected rows was not matched (unless the row were restored outside
of the session).

Change-Id: I9a8871f82cb1ebe67a7ad54d888d5ee835a9a40a
Fixes: #3839
</pre>
</div>
</content>
</entry>
<entry>
<title>Ensure .mapper is set on _ColumnEntity</title>
<updated>2016-10-21T14:42:14+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2016-10-21T13:34:32+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=1f32d014da5d40406cd5d3996be5283c2fc57b26'/>
<id>1f32d014da5d40406cd5d3996be5283c2fc57b26</id>
<content type='text'>
_ColumnEntity didn't seem to have .mapper present, which
due to the way _mapper_zero() worked didn't tend to come
across it.   With :ticket:`3608` _mapper_zero() has
been simplified so make sure this is now present.
Also ensure that _select_from_entity is an entity and
not a mapped class, though this does not seem to matter
at the moment.

Fixes: #3836

Change-Id: Id6dae8e700269b97de3b01562edee95ac1e01f80
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
_ColumnEntity didn't seem to have .mapper present, which
due to the way _mapper_zero() worked didn't tend to come
across it.   With :ticket:`3608` _mapper_zero() has
been simplified so make sure this is now present.
Also ensure that _select_from_entity is an entity and
not a mapped class, though this does not seem to matter
at the moment.

Fixes: #3836

Change-Id: Id6dae8e700269b97de3b01562edee95ac1e01f80
</pre>
</div>
</content>
</entry>
<entry>
<title>Rewrite migration notes for [ticket:3514]</title>
<updated>2016-10-19T17:09:16+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2016-10-19T16:52:55+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=76ec285ba452acf36d725799896904477a9c2dbd'/>
<id>76ec285ba452acf36d725799896904477a9c2dbd</id>
<content type='text'>
The change to "evaluates none" datatypes in the ORM was
not fully described in the migration notes, missing the
key behavioral change that a column which is missing a default
entirely will not receive a value for a missing JSON column now.
The issue here touched upon a revisit of the assumptions
in [ticket:3514], but overall the old behavior "worked" mostly
because the ORM wants to explicitly render NULL into an INSERT
for column values that are missing, which itself is a legacy
behavior which should be considered for possible removal in
a future major release.  Given that "missing ORM value + no
column default set up == dont put it in the INSERT" would be
the most intuitive behavior, the move in [ticket:3514] represents
a step in this direction.

Change-Id: I454d5bb0773bd73d9864925dcc47f1f0810e33ba
Fixes: #3830
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The change to "evaluates none" datatypes in the ORM was
not fully described in the migration notes, missing the
key behavioral change that a column which is missing a default
entirely will not receive a value for a missing JSON column now.
The issue here touched upon a revisit of the assumptions
in [ticket:3514], but overall the old behavior "worked" mostly
because the ORM wants to explicitly render NULL into an INSERT
for column values that are missing, which itself is a legacy
behavior which should be considered for possible removal in
a future major release.  Given that "missing ORM value + no
column default set up == dont put it in the INSERT" would be
the most intuitive behavior, the move in [ticket:3514] represents
a step in this direction.

Change-Id: I454d5bb0773bd73d9864925dcc47f1f0810e33ba
Fixes: #3830
</pre>
</div>
</content>
</entry>
<entry>
<title>Memoize load_path in all cases, run quick populators for path change</title>
<updated>2016-10-17T15:29:23+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2016-10-13T16:27:18+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=c02675b407b8326643b559770d6d9686b880c113'/>
<id>c02675b407b8326643b559770d6d9686b880c113</id>
<content type='text'>
Adds a new variant to the "isnew" state within entity loading
for isnew=False, but the load path is new.  This is to address
the use case of an entity appearing in multiple places in
the row in a more generalized way than the fixes in [ticket:3431],
[ticket:3811] in that loading.py will be able to tell the
populator that this row is not "isnew" but is a "new" path
for the entity.   For the moment, the new information is only
being applied to the use of "quick" populators so that
simple column loads can take place on top of a deferred loader
from elsewhere in the row.

As part of this change, state.load_path() will now always
be populated with the "path" that was in effect when this state
was originally loaded, which for multi-path loads of the
same entity is still non-deterministic.  Ideally there'd be some
kind of "here's all the paths that loaded this state and how"
type of data structure though it's not clear if that could be
done while maintaining performance.

Fixes: #3822
Change-Id: Ib915365353dfcca09e15c24001a8581113b97d5e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds a new variant to the "isnew" state within entity loading
for isnew=False, but the load path is new.  This is to address
the use case of an entity appearing in multiple places in
the row in a more generalized way than the fixes in [ticket:3431],
[ticket:3811] in that loading.py will be able to tell the
populator that this row is not "isnew" but is a "new" path
for the entity.   For the moment, the new information is only
being applied to the use of "quick" populators so that
simple column loads can take place on top of a deferred loader
from elsewhere in the row.

As part of this change, state.load_path() will now always
be populated with the "path" that was in effect when this state
was originally loaded, which for multi-path loads of the
same entity is still non-deterministic.  Ideally there'd be some
kind of "here's all the paths that loaded this state and how"
type of data structure though it's not clear if that could be
done while maintaining performance.

Fixes: #3822
Change-Id: Ib915365353dfcca09e15c24001a8581113b97d5e
</pre>
</div>
</content>
</entry>
<entry>
<title>Assemble "don't joinedload other side" rule using query._current_path</title>
<updated>2016-10-17T15:28:36+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2016-10-14T21:06:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=ae7d2837b3c5ae3fd6e9dad6b14a26abb32cfee5'/>
<id>ae7d2837b3c5ae3fd6e9dad6b14a26abb32cfee5</id>
<content type='text'>
Discovered during testing for [ticket:3822], the rule added
for [ticket:1495] will fail if the source object has propagated
options set up, which add elements to query._current_path.

Fixes: #3824
Change-Id: I3d96c96fee5f9b247f739d2136d18681ac61f2fe
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Discovered during testing for [ticket:3822], the rule added
for [ticket:1495] will fail if the source object has propagated
options set up, which add elements to query._current_path.

Fixes: #3824
Change-Id: I3d96c96fee5f9b247f739d2136d18681ac61f2fe
</pre>
</div>
</content>
</entry>
<entry>
<title>spelling: Postgresql -&gt; PostgreSQL</title>
<updated>2016-10-08T17:42:50+00:00</updated>
<author>
<name>Ville Skyttä</name>
<email>ville.skytta@iki.fi</email>
</author>
<published>2016-10-07T10:18:58+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=8c2c464cb8e1b40f90f544295afbf9a83b372eb7'/>
<id>8c2c464cb8e1b40f90f544295afbf9a83b372eb7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Spelling fixes</title>
<updated>2016-10-08T17:42:50+00:00</updated>
<author>
<name>Ville Skyttä</name>
<email>ville.skytta@iki.fi</email>
</author>
<published>2016-10-07T10:06:09+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=e47063bfe0de1318c12a4f9ef67b9538cad34489'/>
<id>e47063bfe0de1318c12a4f9ef67b9538cad34489</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Check for __clause_element__() in ORM insert/update</title>
<updated>2016-10-05T16:11:53+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2016-10-05T14:57:30+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=09b685b24b19636e11169c181b45333f9739ca35'/>
<id>09b685b24b19636e11169c181b45333f9739ca35</id>
<content type='text'>
ORM attributes can now be assigned any object that is has a
``__clause_element__()`` attribute, which will result in inline
SQL the way any :class:`.ClauseElement` class does.  This covers other
mapped attributes not otherwise transformed by further expression
constructs.

As part of this, it was considered that we could add
__clause_element__() to ClauseElement, however this causes endless loops
in a "while" pattern and this pattern has been identified in third
party libraries.  Add a test to ensure we never make that change.

Change-Id: I9e15b3f1c4883fd3909acbf7dc81d034c6e3ce1d
Fixes: #3802
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ORM attributes can now be assigned any object that is has a
``__clause_element__()`` attribute, which will result in inline
SQL the way any :class:`.ClauseElement` class does.  This covers other
mapped attributes not otherwise transformed by further expression
constructs.

As part of this, it was considered that we could add
__clause_element__() to ClauseElement, however this causes endless loops
in a "while" pattern and this pattern has been identified in third
party libraries.  Add a test to ensure we never make that change.

Change-Id: I9e15b3f1c4883fd3909acbf7dc81d034c6e3ce1d
Fixes: #3802
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge "Enhance "raise" strategy to include "raise_on_sql" option"</title>
<updated>2016-10-04T20:48:08+00:00</updated>
<author>
<name>mike bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2016-10-04T20:48:08+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=e5a5a72e175d7c6a70d5b2a0399377c7a133cced'/>
<id>e5a5a72e175d7c6a70d5b2a0399377c7a133cced</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Enhance "raise" strategy to include "raise_on_sql" option</title>
<updated>2016-10-04T16:09:29+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2016-10-03T19:55:04+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=95d4cd30420414fcede2662aed87b0f2e5a861d4'/>
<id>95d4cd30420414fcede2662aed87b0f2e5a861d4</id>
<content type='text'>
The "raise_on_sql" option differentiates from "raise" in that
firing a lazy loader is OK as long as it does a simple
get from identity map.   Whereas "raise" is more useful
for the case that objects are to be detached.

As part of this, refactors the strategy initiation logic
a bit so that a LoaderStrategy itself knows what "key" was used
to create it, thus allowing variants of a single strategy
based on what the "lazy" argument is.  To achieve this we
have to also get rid of _get_strategy_by_cls().

Everything here is internal with the one exception of an apparently
undocumented, but not underscored, "strategy_class" key
on relationship().   Though it's not clear what
"strategy_class" accomplishes; at this point the strategy
system is extensible using Property.strategy_for().

Fixes: #3812
Change-Id: I812ad878ea5cf764e15f6f71cb39eee78a645d88
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The "raise_on_sql" option differentiates from "raise" in that
firing a lazy loader is OK as long as it does a simple
get from identity map.   Whereas "raise" is more useful
for the case that objects are to be detached.

As part of this, refactors the strategy initiation logic
a bit so that a LoaderStrategy itself knows what "key" was used
to create it, thus allowing variants of a single strategy
based on what the "lazy" argument is.  To achieve this we
have to also get rid of _get_strategy_by_cls().

Everything here is internal with the one exception of an apparently
undocumented, but not underscored, "strategy_class" key
on relationship().   Though it's not clear what
"strategy_class" accomplishes; at this point the strategy
system is extensible using Property.strategy_for().

Fixes: #3812
Change-Id: I812ad878ea5cf764e15f6f71cb39eee78a645d88
</pre>
</div>
</content>
</entry>
</feed>
