summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/dependency.py
Commit message (Collapse)AuthorAgeFilesLines
...
* - clean up copyright, update for 2011, stamp every file withMike Bayer2011-01-021-2/+1
| | | | | a consistent tag - AUTHORS file
* - further optimize what get_all_pending() returns to reduce the work of ↵Mike Bayer2010-12-191-4/+1
| | | | receivers
* - some good inlinings to the whole cascade_iterator() thing.Mike Bayer2010-12-181-9/+9
| | | | | cascade_iterator() should probably not yield the "instance" at all and only deal in states. 30-40K methods taken off the orm2010 test.
* - use get_all_pending in per_state_flush_actions(), but we'd like toMike Bayer2010-12-171-6/+5
| | | | streamline get_history() in any case
* - merge rbbd81cb9a341 from 0.6 branchMike Bayer2010-12-151-1/+3
|
* - inlinings and callcount reductionsMike Bayer2010-12-121-1/+1
| | | | - add test coverage for the rare case of noload->lazyload + pickle
* - use class name by itself in flush warnings to prevent overflow of warnings ↵Mike Bayer2010-11-291-4/+4
| | | | | | | 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
* - establish a consistent pattern of behavior along o2m, m2m, and m2o ↵Mike Bayer2010-11-171-24/+59
| | | | | | | | | | | 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
* - fix test_single test to use default dialectMike Bayer2010-09-151-2/+4
| | | | | | | | | | | | | | | | | | | | | | | - 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".
* - Slight improvement to the behavior of "passive_updates=False"Mike Bayer2010-09-121-5/+8
| | | | | | | | | | | 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.
* - The name ConcurrentModificationError has beenMike Bayer2010-08-011-16/+12
| | | | | | | | | | 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.
* - Moving an o2m object from one collection toMike Bayer2010-07-221-10/+14
| | | | | | | | | | | | | | | | | 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]
* - Removed errant many-to-many load in unitofworkMike Bayer2010-07-071-30/+38
| | | | | | | | | 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]
* 78 charsMike Bayer2010-07-071-37/+57
|
* - cleanup of new post update, changelogMike Bayer2010-06-181-36/+39
|
* this one is actually doing it. removed the cruft we don't need from the old ↵Mike Bayer2010-06-181-39/+34
| | | | | | | approach. not sure if one-to-many with elaborate self-refs, etc., but we appear to be as good as we were before.
* adds some tests, refines out the m2o approach.Mike Bayer2010-06-181-17/+12
|
* this approach seems to allow many-to-one post updates to occur as a single ↵Mike Bayer2010-06-181-25/+56
| | | | | | | | 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.
* - Can now call make_transient() on an instance thatMike Bayer2010-06-151-1/+1
| | | | | | | | | | 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.
* - Fixed bug regarding flushes on self-referentialMike Bayer2010-06-131-7/+11
| | | | | | | 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]
* - Fixed regression introduced in 0.6.0 unit of work refactorMike Bayer2010-05-211-37/+38
| | | | | that broke updates for bi-directional relationship() with post_update=True. [ticket:1807]
* - beef up the --reversetop test option to embed RandomSet throughout the ORMMike Bayer2010-04-151-18/+37
| | | | | | | - 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
* 0.6.0 prepMike Bayer2010-04-141-3/+0
|
* move factory function to classmethodMike Bayer2010-04-111-10/+11
|
* check_reverse was failing a not well covered m2m case.Mike Bayer2010-04-101-2/+3
|
* - starting to groom the branch for its inclusionMike Bayer2010-04-101-24/+29
| | | | | | | | | | | | | | - 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/
* attempt to reduce redundant calc of pk_switchedMike Bayer2010-04-091-5/+19
|
* fix bug + add coverage to ensure unneeded SaveUpdateAll/DeleteAll plus extraMike Bayer2010-04-091-1/+0
| | | | work doesn't occur during per-state usage
* got DetectKeySwitch into the fold, can now greatly collapse a lot of the ↵Mike Bayer2010-04-091-31/+32
| | | | preprocess/process down
* removes some unneeded methods, initial DetectKeySwitch not present unnecessarilyMike Bayer2010-04-091-39/+24
|
* refined system bywhich dependencyprocessor per-state actionsMike Bayer2010-04-091-9/+5
| | | | are established
* starting to arrange things such that unneeded executors aren't gettingMike Bayer2010-04-081-25/+74
| | | | | | 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.
* we can load this sum ahead of time, and if there is none, we dont need a ↵Mike Bayer2010-04-081-8/+10
| | | | | | per-state/proc for this at all. this greatly reduces unnecessary crap in the UOW for complex models.
* - added missing coverage for self-referential many-to-many flushesMike Bayer2010-04-061-10/+17
| | | | | - some other areas where per-state deps are called and an empty result returned are still lacking coverage.
* remove mostly unneeded calls to conditional_post_updateMike Bayer2010-04-061-22/+25
|
* - cleanup, factoring, had some heisenbugs. more test coverageMike Bayer2010-04-061-66/+179
| | | | | will be needed overall as missing dependency rules lead to subtle bugs pretty easily
* all tests pass with this versionMike Bayer2010-04-051-83/+105
|
* beginning to get post_update working, will need more testsMike Bayer2010-04-051-19/+78
|
* - many-to-many is up.Mike Bayer2010-04-051-76/+110
| | | | | - now running on the full suite of tests. unsurprisingly, it appears there are subtle self-referential issues causing many tests to fail.
* - enabled the DetectKeySwitch, and additionally added that it needMike Bayer2010-04-051-73/+77
| | | | | | not execute at all when a one-to-many is present on the reverse side. - OneToMany can establish a state as "listonly" when passive_updates are enabled and the change is due to key switch.
* branch mergeMike Bayer2010-04-051-16/+19
|\
| * better yetMike Bayer2010-04-051-2/+1
| |
| * clarify intent and reduce lookups hereMike Bayer2010-04-051-16/+20
| |
* | - further reduce what topological has to do, expects full list of nodesMike Bayer2010-04-041-14/+18
| | | | | | | | | | - fix some side-effect-dependent behaviors in uow. we can now unconditionally remove "disabled" actions without rewriting
* | this fully moves the per_state methods to work with all states at onceMike Bayer2010-04-041-45/+65
| |
* | moving the per-states operations to be aggreagted on the endpoints to reduceMike Bayer2010-04-041-1/+6
| | | | | | | | procesing overhead.
* | row switch works for post-cycle sorts too...just needed more data in the ↵Mike Bayer2010-04-031-3/+11
| | | | | | | | | | | | deps. the pattern here is more data needed for each tweak.
* | tweak how we indicate child deleted hereMike Bayer2010-04-031-9/+12
| |
* | o2m/m2o pretty much there, minus post update.Mike Bayer2010-04-031-3/+4
| |
* | - basic inheritance behaviorMike Bayer2010-04-031-13/+16
| | | | | | | | | | | | | | - we do need dependencies between an object and its dep when the other object has no save or delete pending. the other object like before isn't needed, but right now we make the dependency just 'None', and it gets thrown away.