Mike Bayer [Sat, 25 Mar 2006 00:17:51 +0000 (00:17 +0000)]
added expunge() method to objectstore
correction in attributes reset_history to really reset in all cases
added unit tests testing refresh()/expire() bug that was fixed by reset_history thing
Mike Bayer [Sat, 18 Mar 2006 00:12:59 +0000 (00:12 +0000)]
PropertyLoader will not re-determine direction when initialized a second time, as it is re-initialized as a copy made for an inheriting mapper, and no longer can get to the correct inheriting table.
Mike Bayer [Fri, 17 Mar 2006 21:11:59 +0000 (21:11 +0000)]
identified more issues with inheritance. mapper inheritance is more 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.
Mike Bayer [Fri, 17 Mar 2006 02:15:09 +0000 (02:15 +0000)]
refactor to engine to have a separate SQLSession object. allows nested transactions.
util.ThreadLocal __hasattr__ method/raise_error param meaningless, removed
renamed old engines test to reflection
Mike Bayer [Thu, 16 Mar 2006 19:08:35 +0000 (19:08 +0000)]
added txt2myt.py to the genhtml/runhtml scripts, added exception if required modules arent found.
edited tutorial.txt, added particles, etc.
added clue that firebird might be supported to dbengine.myt
Alexey Shamrin [Wed, 15 Mar 2006 13:39:11 +0000 (13:39 +0000)]
Tutorial draft (not finished) and documentation framework improvements
* a first step to a new documentation framework, using Markdown syntax, with
some extensions (detailed in txt2myt.py docstrings):
* `rel:something` for internal links
* `{@name=something}` to override default header names (used when linking)
* `{python}` to force code block to use Python syntax highlighting (not
needed when using examples with `>>>` prompt)
* txt2myt.py -- converter from .txt to .myt
* a draft of tutorial.txt, which uses new syntax
* testdocs.py -- check examples in documentation using doctest (currently only
in tutorial.txt)
Mike Bayer [Tue, 14 Mar 2006 19:51:03 +0000 (19:51 +0000)]
added unique_connection() method to engine, connection pool to return a connection
that is not part of the thread-local context or any current transaction
Mike Bayer [Mon, 13 Mar 2006 02:39:52 +0000 (02:39 +0000)]
tweak to get_direction, rolls back a comparison of "foreigntable" to "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).
Mike Bayer [Mon, 13 Mar 2006 01:13:47 +0000 (01:13 +0000)]
small tweak to select in order to fix [ticket:112]...the exported columns when doing select on a select() will be the column names, not the keys. this is with selects that have use_labels=False. which makes sense since using the "key" and not the name implies a label has to be used.
Mike Bayer [Mon, 13 Mar 2006 00:24:54 +0000 (00:24 +0000)]
refactor to Compiled.get_params() to return new ClauseParameters object, a 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
Mike Bayer [Thu, 9 Mar 2006 18:30:27 +0000 (18:30 +0000)]
overhaul to types system, decoupled base type and engine-specific type into a composed pattern instead of goofy inheritance....gets rid of TypeDecorator (now a no-op) and enables all inhertance
Mike Bayer [Thu, 9 Mar 2006 00:24:15 +0000 (00:24 +0000)]
added 'noninherited table' prop to mapper indicating the "lead" table, in 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.
Mike Bayer [Wed, 8 Mar 2006 21:39:53 +0000 (21:39 +0000)]
added check to relation that will see if the same table is included between the primaryjoin and secondaryjoin, and raises a descriptive exception if so.
Mike Bayer [Wed, 8 Mar 2006 20:51:51 +0000 (20:51 +0000)]
serious overhaul to get eager loads to work inline with an inheriting 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.
Mike Bayer [Mon, 6 Mar 2006 03:10:46 +0000 (03:10 +0000)]
a mapper with inheritance will place itself as "dependent" on the inherited 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)
Mike Bayer [Mon, 6 Mar 2006 02:27:13 +0000 (02:27 +0000)]
added new 'polymorphic' example. still trying to understand it :) .
fixes to relation to enable it to locate "direction" more consistently with inheritance relationships
more tweaks to parenthesizing subqueries, unions, etc.
Mike Bayer [Sun, 5 Mar 2006 21:10:20 +0000 (21:10 +0000)]
added unittest for orm-persisted insert without a postfetch, tweak to engine to only signal postfetch if the passivedefault columns received None/NULL for their parameter (since they dont exec otherwise)