SQLAlchemy 0.7.5 is now available.
This release includes some major bugfixes, as well as a handful of new features:
- Relationship loaders like joinedload() accept a "wildcard" character, e.g.
'*', to establish the "default loading strategy" for a query.
- New reflection features allow autoloading of tables to be smoothly
integrated with Declarative mappings, allowing database connectivity to be
established in a later step after classes have been defined.
- Multiple Declarative bases can share the same registry of class names.
For a full list of changes including all bug fixes (about 27 in total), see
CHANGES.
SQLAlchemy 0.7.5 can be downloaded at:
http://www.sqlalchemy.org/download.html
0.7.5 (January 28, 2012)
=
- orm
- [bug] Fixed issue where modified session state
established after a failed flush would be committed
as part of the subsequent transaction that
begins automatically after manual call
to rollback(). The state of the session is
checked within rollback(), and if new state
is present, a warning is emitted and
restore_snapshot() is called a second time,
discarding those changes. [ticket:2389]
- [bug] Fixed regression from 0.7.4 whereby
using an already instrumented column from a
superclass as "polymorphic_on" failed to resolve
the underlying Column. [ticket:2345]
- [bug] Raise an exception if xyzload_all() is
used inappropriately with two non-connected
relationships. [ticket:2370]
- [feature] Added "class_registry" argument to
declarative_base(). Allows two or more declarative
bases to share the same registry of class names.
- [feature] query.filter() accepts multiple
criteria which will join via AND, i.e.
query.filter(x==y, z>q, ...)
- [feature] Added new capability to relationship
loader options to allow "default" loader strategies.
Pass '*' to any of joinedload(), lazyload(),
subqueryload(), or noload() and that becomes the
loader strategy used for all relationships,
except for those explicitly stated in the
Query. Thanks to up-and-coming contributor
Kent Bower for an exhaustive and well
written test suite ! [ticket:2351]
- [bug] Fixed bug whereby event.listen(SomeClass)
forced an entirely unnecessary compile of the
mapper, making events very hard to set up
at module import time (nobody noticed this ??)
[ticket:2367]
- [bug] Fixed bug whereby hybrid_property didn't
work as a kw arg in any(), has().
- Fixed regression from 0.6 whereby if
"load_on_pending" relationship() flag were used
where a non-"get()" lazy clause needed to be
emitted on a pending object, it would fail
to load.
- [bug] ensure pickleability of all ORM exceptions
for multiprocessing compatibility. [ticket:2371]
- [bug] implemented standard "can't set attribute" /
"can't delete attribute" AttributeError when
setattr/delattr used on a hybrid that doesn't
define fset or fdel. [ticket:2353]
- [bug] Fixed bug where unpickled object didn't
have enough of its state set up to work
correctly within the unpickle() event established
by the mutable object extension, if the object
needed ORM attribute access within
__eq__() or similar. [ticket:2362]
- [bug] Fixed bug where "merge" cascade could
mis-interpret an unloaded attribute, if the
load_on_pending flag were used with
relationship(). Thanks to Kent Bower
for tests. [ticket:2374]
- [feature] New declarative reflection example
added, illustrates how best to mix table reflection
with declarative as well as uses some new features
from [ticket:2356].
- sql
- [feature] New reflection feature "autoload_replace";
when set to False on Table, the Table can be autoloaded
without existing columns being replaced. Allows
more flexible chains of Table construction/reflection
to be constructed, including that it helps with
combining Declarative with table reflection.
See the new example on the wiki. [ticket:2356]
- [bug] Improved the API for add_column() such that
if the same column is added to its own table,
an error is not raised and the constraints
don't get doubled up. Also helps with some
reflection/declarative patterns. [ticket:2356]
- [feature] Added "false()" and "true()" expression
constructs to sqlalchemy.sql namespace, though
not part of __all__ as of yet.
- [feature] Dialect-specific compilers now raise
CompileException for all type/statement compilation
issues, instead of InvalidRequestError or ArgumentError.
The DDL for CREATE TABLE will re-raise
CompileExceptions to include table/column information
for the problematic column. [ticket:2361]
- [bug] Fixed issue where the "required" exception
would not be raised for bindparam() with required=True,
if the statement were given no parameters at all.
[tick