summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/dependency.py
Commit message (Collapse)AuthorAgeFilesLines
* - happy new yearMike Bayer2014-01-051-1/+1
|
* Fixed bug where many-to-many relationship with uselist=FalseMike Bayer2013-04-211-3/+7
| | | | | | 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]
* happy new year (see #2645)Diana Clarke2013-01-011-1/+1
|
* just a pep8 pass of lib/sqlalchemy/orm/Diana Clarke2012-11-191-26/+23
|
* - [feature] Adding/removing None from a mapped collectionMike Bayer2012-08-131-8/+10
| | | | | | | | | | | 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]
* move mapper-level UOW functionality straight into unitofwork also. there'sMike Bayer2012-07-141-200/+200
| | | | | | 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.
* - move all of orm to use absolute importsMike Bayer2012-06-231-5/+6
| | | | | | | | - 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
* happy new yearMike Bayer2012-01-041-1/+1
|
* - "delete-orphan" cascade is now allowed onMike Bayer2011-06-041-1/+1
| | | | | | | | | | 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
* - and fix the message that was the actual subject of [ticket:2063]Mike Bayer2011-03-271-3/+9
|
* - Reworded the exception raised when a flushMike Bayer2011-03-271-8/+15
| | | | | is attempted of a subclass that is not polymorphic against the supertype. [ticket:2063]
* corrected a bunch of spelling typosDiana Clarke2011-02-281-1/+1
|
* - A tweak to the unit of work causes it to orderMike Bayer2011-03-061-1/+3
| | | | | | | | | | | | | 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]
* - remove some remaining sys.modules shenanigansrel_0_7b1Mike Bayer2011-02-121-2/+1
| | | | | | | | | - 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.
* - replace all usage of True and False for passive with PASSIVE_NO_INITIALIZE,Mike Bayer2011-02-111-23/+39
| | | | | | PASSIVE_OFF, now expresed as non-boolean symbols - make "passive" available positionally on all get_history() methods, call it like that
* - Additional tuning to "many-to-one" relationshipMike Bayer2011-02-111-1/+6
| | | | | | | | | | 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]
* - Fixed bug whereby "passive_deletes='all'" wasn't passingMike Bayer2011-01-041-7/+10
| | | | | the correct symbols to lazy loaders during flush, thereby causing an unwarranted load. [ticket:2013]
* - whitespace removal bonanzaMike Bayer2011-01-021-90/+90
|
* - 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.