+ Fixed bug whereby using "key" with Column
+ in conjunction with "schema" for the owning
+ Table would fail to locate result rows due
+ to the MSSQL dialect's "schema rendering"
+ logic's failure to take .key into account.
Fixed bug mostly local to new
AbstractConcreteBase helper where the "type"
A warning is emitted when lazy='dynamic'
is combined with uselist=False. This is an
Fixed bug whereby user error in related-object
assignment could cause recursion overflow if the
Fixed more un-intuitivenesses in CTEs
which prevented referring to a CTE in a union
Fixed the repr() of Enum to include
the "name" and "native_enum" flags. Helps
Added support for the localtimestamp()
SQL function implemented in SQLite, courtesy
Updated mysqlconnector interface to use
updated "client flag" and "charset" APIs,
Fixed bug where reflection of primary key constraint
would double up columns if the same constraint/table
The 'objects' argument to
flush() is no longer deprecated, as some
Added new flag to @validates
include_removes. When True, collection
Fixed bug in relationship comparisons
whereby calling unimplemented methods like
Removed warning when Index is created
with no columns; while this might not be what
Added new connection event
dbapi_error(). Is called for all DBAPI-level
If conn.begin() fails when calling
"with engine.begin()", the newly acquired
Added interim create_engine flag
supports_unicode_binds to PyODBC dialect,
Repaired the use_scope_identity
create_engine() flag when using the pyodbc
Fixed bug whereby get_view_names() for
"information_schema" schema would fail
Added "no_autoflush" context
manager to Session, used with with:
Improved the "declarative reflection"
example to support single-table inheritance,
Added execution_options() call to
MockConnection (i.e., that used with
Added some decent context managers
with engine.begin() as conn:
<work with conn in a transaction>
with engine.connect() as conn:
Both close out the connection when done,
commit or rollback transaction with errors
Altered _params_from_query() function
in Beaker example to pull bindparams from the
Added "class_registry" argument to
declarative_base(). Allows two or more declarative
query.filter() accepts multiple
criteria which will join via AND, i.e.
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
Added "false()" and "true()" expression
constructs to sqlalchemy.sql namespace, though
removed an erroneous "raise" in the
SQLite dialect when getting table names
polymorphic_on now accepts many
- standalone expressions that aren't
- column_property() objects
- string names of any column_property()
or attribute name of a mapped Column
The docs include an example using
the case() construct, which is likely to be
a common constructed used here. and part of
Standalone expressions in polymorphic_on
propagate to single-table inheritance
subclasses so that they are used in the
Added new value for Column autoincrement
called "ignore_fk", can be used to force autoincrement
Fixed bug in get_history() when referring
to a composite attribute that has no value;
Added new support for remote "schemas":
MetaData() accepts "schema" and "quote_schema"
arguments, which will be applied to the same-named
Sequence accepts "quote_schema" argument
tometadata() for Table will use the "schema"
of the incoming MetaData for the new Table
Added CreateSchema and DropSchema DDL
constructs - these accept just the string
When using default "schema" with MetaData,
ForeignKey will also assume the "default" schema
Fixed bug whereby TypeDecorator would
return a stale value for _type_affinity, when
Fixed bug whereby "order_by='foreign_key'"
option to Inspector.get_table_names
:tags: postgresql, feature
Added create_type constructor argument
to pg.ENUM. When False, no CREATE/DROP or
Unicode adjustments allow latest pymysql
(post 0.4) to pass 100% on Python 2.
Added an example to the hybrid docs
of a "transformer" - a hybrid that returns a
the @compiles decorator raises an
informative error message when no "default"
Fixed bug in history_meta.py example where
the "unique" flag was not removed from a
added "adapt_on_names" boolean flag to orm.aliased()
construct. Allows an aliased() construct
Added new flag expire_on_flush=False to column_property(),
marks those properties that would otherwise be considered
Fixed a variety of synonym()-related regressions
Query will convert an OFFSET of zero when
slicing into None, so that needless OFFSET
Repaired edge case where mapper would fail
to fully update internal state when a relationship
Fixed bug whereby if __eq__() was
redefined, a relationship many-to-one lazyload
- would hit the __eq__() and fail.
+ would hit the __eq__() and fail.
New event hook, MapperEvents.after_configured().
Called after a configure() step has completed and
Added optional "sa_pool_key" argument to
pool.manage(dbapi).connect() so that serialization
Ensured that the same ValueError is raised for
illegal date/time/datetime string parsed from
Use an atomic counter as the "random number"
source for server side cursor names;
Adjusted dictlike-polymorphic.py example
to apply the CAST such that it works on
from a joined-inh structure to itself on
relationship() with join condition on the child
table would convert the lead entity into the
- joined one inappropriately.
+ joined one inappropriately.
sorting of persistent + pending objects during
flush would produce an illegal comparison,
if the persistent object primary key
- is not a single integer.
+ is not a single integer.
Fixed bug whereby the source clause
used by query.join() would be inconsistent
if against a column expression that combined
- multiple entities together.
+ multiple entities together.
as SQLA should never consult these,
the methods would be consulted if the class
was part of a "composite" (i.e. non-single-entity)
Added the same "columns-only" check to
mapper.polymorphic_on as used when
Added an informative error message when
ForeignKeyConstraint refers to a column name in
Fixed bug where "autoincrement" detection on
Table would fail if the type had no "affinity"
Context manager provided by Connection.begin()
will issue rollback() if the commit() fails,
Added mixin class sqlalchemy.ext.DontWrapMixin.
User-defined exceptions of this type are never
StatementException wrapping will display the
original exception class in the message.
Adjusted the pyodbc dialect such that bound
values are passed as bytes and not unicode
repaired the oracle.RAW type which did not
- generate the correct DDL.
+ generate the correct DDL.
Fixed bug in the mutable extension whereby
if the same type were used twice in one
Fixed bug in the mutable extension whereby
if None or a non-corresponding type were set,
Repaired the examples/versioning test runner
to not rely upon SQLAlchemy test libs,
Tweak to examples/versioning to pick the
correct foreign key in a multi-level
Fixed the attribute shard example to check
for bind param callable correctly in 0.7
Fixed bug whereby metadata.reflect(bind)
would close a Connection passed as a
Streamlined the process by which a Select
determines what's in it's '.c' collection.
Deprecate schema/SQL-oriented methods on
Connection/Engine that were never well known
Unit tests pass 100% on MySQL installed
supports_sane_rowcount will be set to False
if using MySQLdb and the DBAPI doesn't provide
:released: Fri May 20 2011
This section documents those changes from 0.7b4
to 0.7.0. For an overview of what's new in
for joined-inh subclass related to itself,
or joined-inh subclass related to a subclass
of that with no cols in the sub-sub class
added Query.with_session() method, switches
Query to use a different session.
polymorphic_union() renders the columns in their
original table order, as according to the first
Fixed bug whereby mapper mapped to an anonymous
alias would fail if logging were used, due to
- unescaped % sign in the alias name.
+ unescaped % sign in the alias name.
Changed the handling in determination of join
conditions such that foreign key errors are
Some improvements to error handling inside
of the execute procedure to ensure auto-close
metadata.reflect() and reflection.Inspector()
had some reliance on GC to close connections
Fixed the psycopg2_version parsing in the
removed the ancient "polymorphic association"
examples and replaced with an updated set of
Changes to the format of CHANGES, this file.
The format changes have been applied to
The "-declarative" changes will now be listed
directly under the "-orm" section, as these
The 0.5 series changes have been moved to
the file CHANGES_PRE_06 which replaces
The changelog for 0.6.7 and subsequent within
the 0.6 series is now listed only in the
Still more wording adjustments when a query option
can't find the target entity. Explain that the
the back-referenced collection wouldn't
properly handle add/removes with no net
change. Thanks to Richard Murri for the
Restored the "catchall" constructor on the base
TypeEngine class, with a deprecation warning.
The limit/offset keywords to select() as well
as the value passed to select.limit()/offset()
- will be coerced to integer.
+ will be coerced to integer.
fixed bug where "from" clause gathering from an
over() clause would be an itertools.chain() and
The "pool.manage" feature doesn't use pickle
anymore to hash the arguments for each pool.
Fixed bug where reflection of foreign key
created as "REFERENCES <tablename>" without
Psycopg2 for Python 3 is now supported.
Lots of fixes to unit tests when run under Pypy
Changed the underlying approach to query.count().
query.count() is now in all cases exactly:
That is, "select count(1) from (<full query>)".
This produces a subquery in all cases, but
vastly simplifies all the guessing count()
Added a fully descriptive error message for the
case where Column is subclassed and _make_proxy()
To help with the "column_reflect" event being used
with specific Table objects instead of all instances
Fixed the BIT type to allow a "length" parameter, "varying"
- parameter. Reflection also fixed.
+ parameter. Reflection also fixed.
typically when using the Inspector interface, to
use sys.sql_modules instead of the information schema,
thereby allowing views definitions longer than 4000
- characters to be fully returned.
+ characters to be fully returned.
Updated the association, association proxy examples
to use declarative, added a new example
The Beaker caching example allows a "query_cls" argument
- to the query_callable() function.
+ to the query_callable() function.
Beaker example now takes into account 'limit'
and 'offset', bind params within embedded
:released: Sat Feb 12 2011
Detailed descriptions of each change below are
The "sqlalchemy.exceptions" alias in sys.modules
has been removed. Base SQLA exceptions are
Mutation Event Extension, supercedes "mutable=True"
Query.join(), Query.outerjoin(), eagerload(),
eagerload_all(), others no longer allow lists
ScopedSession.mapper is removed (deprecated since 0.5).
The "name" field used in orm.aliased() now renders
in the resulting SQL statement.
the value of "passive" as passed to
attributes.get_history() should be one of the
A warning is emitted when a joined-table inheriting mapper
has no primary keys on the locally mapped table
- (but has pks on the superclass table).
+ (but has pks on the superclass table).
select.prefix_with() accepts multiple expressions
(i.e. *expr), 'prefix' keyword argument to select()
Passing a string to the `distinct` keyword argument
of `select()` for the purpose of emitting special
The Index() construct can be created inline with a Table
definition, using strings as column names, as an alternative
Bind parameters present in the "columns clause" of a select
are now auto-labeled like other "anonymous" clauses,
TypeDecorator is present in the "sqlalchemy" import space.
specified, so that the default length, normally '1'
as per SQL server documentation, is instead
'unbounded'. This also occurs for the VARBINARY type..
This behavior makes these types more closely compatible
with Postgresql's VARCHAR type which is similarly unbounded
when no length is specified.
oursql dialect accepts the same "ssl" arguments in
- create_engine() as that of MySQLdb.
+ create_engine() as that of MySQLdb.