| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
would fail to delete the association row and raise an error
if the scalar attribute were set to None. Also in 0.7.11.
[ticket:2710]
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
now generates attribute events. Previously, a None
append would be ignored in some cases. Related
to [ticket:2229].
- [feature] The presence of None in a mapped collection
now raises an error during flush. Previously,
None values in collections would be silently ignored.
[ticket:2229]
|
|
|
|
|
|
| |
no need for this to be per-mapper. can't move dependency init
off of property though as this init needs to happen up front, added a test
to prove it.
|
|
|
|
|
|
|
|
| |
- break out key mechanics of loading objects
into new "orm.loading" module, removing implementation
details from both mapper.py and query.py. is analogous
to persistence.py
- some other cleanup and old cruft removal
|
| |
|
|
|
|
|
|
|
|
|
|
| |
self-referential relationships - this since
SQLA 0.7 no longer enforces "parent with no
child" at the ORM level; this check is left
up to foreign key nullability.
Related to [ticket:1912]
- a lot of cleanup and refactoring on relationship()
init, clarification
|
| |
|
|
|
|
|
| |
is attempted of a subclass that is not polymorphic
against the supertype. [ticket:2063]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the flush along relationship() dependencies even if
the given objects don't have any inter-attribute
references in memory, which was the behavior in
0.5 and earlier, so a flush of Parent/Child with
only foreign key/primary key set will succeed.
This while still maintaining 0.6 and above's not
generating a ton of useless internal dependency
structures within the flush that don't correspond
to state actually within the current flush.
[ticket:2082]
|
|
|
|
|
|
|
|
|
| |
- The "sqlalchemy.exceptions" alias in sys.modules
has been removed. Base SQLA exceptions are
available via "from sqlalchemy import exc".
The "exceptions" alias for "exc" remains in
"sqlalchemy" for now, it's just not patched into
sys.modules.
|
|
|
|
|
|
| |
PASSIVE_OFF, now expresed as non-boolean symbols
- make "passive" available positionally on all get_history() methods,
call it like that
|
|
|
|
|
|
|
|
|
|
| |
loads during a flush(). A change in version 0.6.6
([ticket:2002]) required that more "unnecessary" m2o
loads during a flush could occur. Extra loading modes have
been added so that the SQL emitted in this
specific use case is trimmed back, while still
retrieving the information the flush needs in order
to not miss anything. [ticket:2049]
|
|
|
|
|
| |
the correct symbols to lazy loaders during flush, thereby
causing an unwarranted load. [ticket:2013]
|
| |
|
|
|
|
|
| |
a consistent tag
- AUTHORS file
|
|
|
|
| |
receivers
|
|
|
|
|
| |
cascade_iterator() should probably not yield the "instance" at all
and only deal in states. 30-40K methods taken off the orm2010 test.
|
|
|
|
| |
streamline get_history() in any case
|
| |
|
|
|
|
| |
- add test coverage for the rare case of noload->lazyload + pickle
|
|
|
|
|
|
|
| |
registry
- test suite swaps out warnings.warn with warnings.warn_explicit, to solve warnings registry issue
- explicitly disallow functions from inside test.bootstrap, test.lib being interpreted as tests
|
|
|
|
|
|
|
|
|
|
|
| |
relationships
when "save-update" cascade is disabled, or the target object is otherwise not
present in the session, and collection/scalar changes have taken place. A warning
is emitted describing the type of operation, the target reference, and the relationship
description, stating that the operation will not take place. The operation then doesn't
take place. [ticket:1973]
- clean up test_cascade a little bit, remove cruft
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- The exception raised by Session when it is used
subsequent to a subtransaction rollback (which is what
happens when a flush fails in autocommit=False mode) has
now been reworded (this is the "inactive due to a
rollback in a subtransaction" message). In particular,
if the rollback was due to an exception during flush(),
the message states this is the case, and reiterates the
string form of the original exception that occurred
during flush. If the session is closed due to explicit
usage of subtransactions (not very common), the message
just states this is the case.
- The exception raised by Mapper when repeated requests to
its initialization are made after initialization already
failed no longer assumes the "hasattr" case, since
there's other scenarios in which this message gets
emitted, and the message also does not compound onto
itself multiple times - you get the same message for
each attempt at usage. The misnomer "compiles" is being
traded out for "initialize".
|
|
|
|
|
|
|
|
|
|
|
| |
when placed only on the many-to-one side of a
relationship; documentation has been clarified
that passive_updates=False should really be on the
one-to-many side.
- Placing passive_deletes=True on a many-to-one emits
a warning, since you probably intended to put it on
the one-to-many side.
|
|
|
|
|
|
|
|
|
|
| |
changed to StaleDataError, and descriptive
error messages have been revised to reflect
exactly what the issue is. Both names will
remain available for the forseeable future
for schemes that may be specifying
ConcurrentModificationError in an "except:"
clause.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
another, or vice versa changing the referenced
object by an m2o, where the foreign key is also a
member of the primary key, will now be more
carefully checked during flush if the change in
value of the foreign key on the "many" side is the
result of a change in the primary key of the "one"
side, or if the "one" is just a different object.
In one case, a cascade-capable DB would have
cascaded the value already and we need to look at
the "new" PK value to do an UPDATE, in the other we
need to continue looking at the "old". We now look
at the "old", assuming passive_updates=True,
unless we know it was a PK switch that
triggered the change. [ticket:1856]
|
|
|
|
|
|
|
|
|
| |
which triggered unnecessarily on expired/unloaded
collections. This load now takes place only if
passive_updates is False and the parent primary
key has changed, or if passive_deletes is False
and a delete of the parent has occurred.
[ticket:1845]
|
| |
|
| |
|
|
|
|
|
|
|
| |
approach.
not sure if one-to-many with elaborate self-refs, etc., but we appear to be
as good as we were before.
|
| |
|
|
|
|
|
|
|
|
| |
action. for one-to-many, we
have it working the old way still. as usual the huge job is the tests. also I am not yet certain
that post updates can always be a "full mapper" operation, i.e. are never involved in per-state dependencies,
or even if the old approach supports that.
|
|
|
|
|
|
|
|
|
|
| |
is referenced by parent objects via many-to-one,
without the parent's foreign key value getting
temporarily set to None - this was a function
of the "detect primary key switch" flush handler.
It now ignores objects that are no longer
in the "persistent" state, and the parent's
foreign key identifier is left unaffected.
|
|
|
|
|
|
|
| |
bi-directional many-to-many relationships, where
two objects made to mutually reference each other
in one flush would fail to insert a row for both
sides. Regression from 0.5. [ticket:1824]
|
|
|
|
|
| |
that broke updates for bi-directional relationship()
with post_update=True. [ticket:1807]
|
|
|
|
|
|
|
| |
- with m2m we have to go back to the previous approach of having both sides of
the DP fire off, tracking each pair of objects. history may not be consistently present
in one side or the other
- this revealed a whole lot of issues with self-referential m2m, which are fixed
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- one-to-many relationships now maintain a list of positive
parent-child associations within the flush, preventing
previous parents marked as deleted from cascading a
delete or NULL foreign key set on those child objects,
despite the end-user not removing the child from the old
association. [ticket:1764]
- re-established Preprocess as unique on their arguments,
as they were definitely duped in inheritance scenarios
- added a "memo" feature to UOWTransaction which represents the usual
pattern of using the .attributes collection
- added the test case from [ticket:1081] into perf/
|
| |
|
|
|
|
| |
work doesn't occur during per-state usage
|
|
|
|
| |
preprocess/process down
|
| |
|
|
|
|
| |
are established
|
|
|
|
|
|
| |
pulled into the unit of work at all. this involves dancing around lists
of states, seeing if child objects exist, not adding excessive callcounts
while doing that, etc.
|