summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/mapping
Commit message (Collapse)AuthorAgeFilesLines
...
* PropertyLoader will not re-determine direction when initialized a second ↵Mike Bayer2006-03-181-1/+5
| | | | time, as it is re-initialized as a copy made for an inheriting mapper, and no longer can get to the correct inheriting table.
* identified more issues with inheritance. mapper inheritance is more ↵Mike Bayer2006-03-173-17/+31
| | | | | | | closed-minded about how it creates the join crit erion as well as the sync rules in inheritance. syncrules have been tightened up to be smarter about creating a new SyncRule given lists of tables and a join clause. properties also checks for relation direction against the "noninherited table" which for the moment makes it a stronger requirement that a relation to a mapper must relate to that mapper's main table, not any tables that it inherits from.
* an import ! eeshMike Bayer2006-03-171-1/+1
|
* factored objectstore into two packages, one more public facing the other ↵Mike Bayer2006-03-172-805/+839
| | | | more to be *feared* ! :)
* removed redundant is_dirty functionMike Bayer2006-03-141-5/+0
|
* Fix docstring and exception message in selectone_byAlexey Shamrin2006-03-131-2/+2
|
* added selectfirst_by/selectone_by, selectone throws exception if more than ↵Mike Bayer2006-03-131-17/+28
| | | | one row returned, courtesy J.Ellis
* tweak to get_direction, rolls back a comparison of "foreigntable" to ↵Mike Bayer2006-03-131-2/+4
| | | | "parent"/"mapper" table to be more constrained. this change was originally in [changeset:1101] to help out the polymorph example but it now works without it. the change breaks the Post/Comment relationship in the ZBlog demo since the Post mapper has the comments table inside of it (also with no workaround).
* refactor to Compiled.get_params() to return new ClauseParameters object, a ↵Mike Bayer2006-03-131-2/+2
| | | | | | | | | | | more intelligent bind parameter dictionary that does type conversions late and preserves the unconverted value; used to fix mappers not comparing correct value in post-fetch [ticket:110] removed pre_exec assertion from oracle/firebird regarding "check for sequence/primary key value" fix to Unicode type to check for null, fixes [ticket:109] create_engine() now uses genericized parameters; host/hostname, db/dbname/database, password/passwd, etc. for all engine connections fix to select([func(column)]) so that it creates a FROM clause to the column's table, fixes [ticket:111] doc updates for column defaults, indexes, connection pooling, engine params unit tests for the above bugfixes
* added expire() function + unit test fixes [ticket:95]Mike Bayer2006-03-101-0/+13
|
* added 'noninherited table' prop to mapper indicating the "lead" table, in ↵Mike Bayer2006-03-092-8/+5
| | | | | | | | the case of inheritance. relations now create priamry/secondary joins against that lead table. if you want to create it against an inherited table, use explicit join conditions. added 'correlate' argument to CompoundSelect to get polymorph example working again.
* added identity() method to mapper, to help get the primary key of an instance.Mike Bayer2006-03-081-1/+7
|
* added check to relation that will see if the same table is included between ↵Mike Bayer2006-03-082-2/+11
| | | | the primaryjoin and secondaryjoin, and raises a descriptive exception if so.
* serious overhaul to get eager loads to work inline with an inheriting ↵Mike Bayer2006-03-082-11/+32
| | | | mapper, when the inheritance/eager loads share the same table. mapper inheritance will also favor the columns from the child table over those of the parent table when assigning column values to object attributes. "correlated subqueries" require a flag "correlated=True" if they are in the FROM clause of another SELECT statement, and they want to be correlated. this flag is set by default when using an "exists" clause.
* commentMike Bayer2006-03-071-3/+5
|
* backref() func will also honor lazy=True/FalseMike Bayer2006-03-071-1/+6
|
* added backref() function, allows the creation of a backref where you also ↵Mike Bayer2006-03-072-19/+39
| | | | send keyword arguments that will be placed on the relation
* fixed bug in eager loading on a many-to-one [ticket:96], added the ticket ↵Mike Bayer2006-03-061-0/+5
| | | | | | tests as a unit test eagerload2. got eagerload1 to be a unit test also.
* a mapper with inheritance will place itself as "dependent" on the inherited ↵Mike Bayer2006-03-062-4/+7
| | | | mapper; even though this is not usually needed, it allows certain exotic combinations of mapper setups to work (i.e. the one in the polymorph example)
* added new 'polymorphic' example. still trying to understand it :) .Mike Bayer2006-03-062-4/+4
| | | | | fixes to relation to enable it to locate "direction" more consistently with inheritance relationships more tweaks to parenthesizing subqueries, unions, etc.
* delete tables in an inheritance rel. requires them in reverseMike Bayer2006-03-061-1/+3
|
* got mapper to receive the onupdates after updating an instance (also ↵Mike Bayer2006-03-051-9/+22
| | | | properly receives defaults on inserts)...
* added objectstore.refresh(), including supporting changes in mapper, ↵Mike Bayer2006-03-022-24/+43
| | | | attributes, util
* took out that "TypeError" wrapper since it blows away stack traces and ↵Mike Bayer2006-02-281-5/+1
| | | | confuses users
* got mapper.using() to work, fixed push/pop mapper, custom session assignmentsMike Bayer2006-02-272-11/+33
|
* more work on cycles, fleshed out tests for post_update, fix to the delete ↵Mike Bayer2006-02-271-1/+1
| | | | | | phase of a one-to-many post update closes [ticket:67]
* imported casacde_mappersMike Bayer2006-02-261-1/+1
|
* implemented SyncRules for mapper with inheritance relationship, fixes ↵Mike Bayer2006-02-263-11/+24
| | | | | | [ticket:81] TableFinder becomes a list-implementing object (should probably create clauseutils or sqlutils for these little helper visitors)
* factored out "syncrule" logic to a separate package, so mapper will be able ↵Mike Bayer2006-02-263-110/+140
| | | | to make use of it as well as properties. also clarifies the "synchronization" idea
* place _instance_key on object only when objectstore finally register_clean's ↵Mike Bayer2006-02-261-3/+1
| | | | | | on it, to make room for more aggressive "identity map" assertion when modifying objects incoming from a result set
* register_deleted/register_dirty perform pre-check before doing the ↵Mike Bayer2006-02-261-8/+10
| | | | "validate" operation to cut down on method overhaed
* fixed exception import. check for objects being present in the identity map ↵Mike Bayer2006-02-261-2/+10
| | | | | | occurs not just at commit time but also when its logged as "dirty" or "deleted".
* adjustment to compile synchronizers which allows many-to-many synchronize to ↵Mike Bayer2006-02-261-2/+7
| | | | work even when one side of the relation has both tables in it (new unittest will be added to inheritance.py to show this...)
* merged sql_rearrangement branch , refactors sql package to work standalone withMike Bayer2006-02-252-12/+11
| | | | | clause elements including tables and columns, schema package deals with "physical" representations
* get() method needs to use the full table, not just the 'primary' table, to ↵Mike Bayer2006-02-241-1/+1
| | | | get the full list of primary key cols
* moved iteration of props so that props can set up self-referring backref ↵Mike Bayer2006-02-221-1/+2
| | | | properties without getting a "list changed during iteration" error
* more fix to one-to-one: 'unchanged_items' can be [None] also with one to one ↵Mike Bayer2006-02-221-2/+3
| | | | | | so check for this during delete
* when begin/commit, an exception should still reset the transactional stateMike Bayer2006-02-221-3/+5
|
* fix to EagerLoad where it late-initializes its eager chain, thereby not ↵Mike Bayer2006-02-221-7/+18
| | | | getting messed up by late add_property() calls
* when creating lazy clause both sides of each clause must be ColumnMike Bayer2006-02-211-2/+2
|
* working on postupdate idea, refactoring to dependency processingMike Bayer2006-02-214-43/+61
|
* merged eager loading overhaul rev 1001:1009Mike Bayer2006-02-201-130/+87
| | | | | | | | | | | | | | | | | this includes: sql.Alias object keeps track of the immediate thing it aliased as well as the ultimate non-aliased (usually a Table) object, so that proxied columns can have a "parent" attribute some cleanup to SelectBaseMixin.order_by_clause to allow easier access, needs more cleanup engine has been making two ResultProxies all this time, added "return_raw" quickie flag to disable that some cleanup to _get_col_by_original so that it also works for oid columns, new eager load stuff more aggressively aliaseses orderby's so this was needed EagerLoader now makes "chains" of unique aliased eager loaders in all cases. no need for use_alias/selectalias anymore since it aliases every time. properly detects recursive eager loads and terminates them with a lazyloader, instead of raising an exception. totally simplified setup() and init() is more straightforward and has a single codepath now instead of two or three.
* some comments, changed SmartProperty to be smarter, UOWMike Bayer2006-02-193-2/+22
| | | | | version has "property" accessor which returns MapperProperty at the class level
* some docstrings etcMike Bayer2006-02-191-3/+6
|
* exception package added, support throughoutMike Bayer2006-02-195-51/+50
|
* base begin method returns transaciton objectMike Bayer2006-02-181-1/+1
|
* added new style of begin/commit which returns a tranactional objectMike Bayer2006-02-181-13/+34
|
* Join object wasnt exporting foreign keys correctlyMike Bayer2006-02-161-8/+24
| | | | compile_synchronizers in PropertyLoader needed to take into account the full list of tables for each mapper when looking for synchronization rules, not just primary table
* commentrel_0_1_0Mike Bayer2006-02-141-2/+4
|
* the list-based foreign key doenst seem to work quite right, rolling it backMike Bayer2006-02-141-15/+10
|