Mike Bayer [Sat, 15 Jun 2013 19:20:48 +0000 (15:20 -0400)]
Fixed bug in polymorphic SQL generation where multiple joined-inheritance
entities against the same base class joined to each other as well
would not track columns on the base table independently of each other if
the string of joins were more than two entities long. Also in 0.8.2.
[ticket:2759]
Mike Bayer [Mon, 10 Jun 2013 17:50:06 +0000 (13:50 -0400)]
Fixed bug where sending a composite attribute into :meth:`.Query.order_by`
would produce a parenthesized expression not accepted by some databases.
[ticket:2754]
Mike Bayer [Mon, 10 Jun 2013 17:45:19 +0000 (13:45 -0400)]
Fixed the interaction between composite attributes and
the :func:`.aliased` function. Previously, composite attributes
wouldn't work correctly in comparison operations when aliasing
was applied. Also in 0.8.2. [ticket:2755]
Roman Podolyaka [Sat, 8 Jun 2013 17:38:02 +0000 (20:38 +0300)]
Fix using of 'mysql_length' for composite indexes
Currently, one can specify the prefix length for an index
column using 'mysql_length' keyword argument when creating
an Index instance. But in case of composite indexes the
prefix length value is applied only to the last column.
Extend the existing API in way so that 'mysql_length' argument
value can be either:
- an integer specifying the same prefix length value
for each column of an index
- a (column_name --> integer value) mapping specifying
the prefix length value for each column of an index
separately
Mike Bayer [Thu, 6 Jun 2013 16:52:18 +0000 (12:52 -0400)]
When querying the information schema on SQL Server 2000, removed
a CAST call that was added in 0.8.1 to help with driver issues,
which apparently is not compatible on 2000.
The CAST remains in place for SQL Server 2005 and greater.
[ticket:2747]
Mike Bayer [Mon, 3 Jun 2013 22:33:20 +0000 (18:33 -0400)]
The ``deferrable`` keyword argument on :class:`.ForeignKey` and
:class:`.ForeignKeyConstraint` will not render the ``DEFERRABLE`` keyword
on the MySQL dialect. For a long time we left this in place because
a non-deferrable foreign key would act very differently than a deferrable
one, but some environments just disable FKs on MySQL, so we'll be less
opinionated here. [ticket:2721]
Mike Bayer [Mon, 3 Jun 2013 21:03:15 +0000 (17:03 -0400)]
Fixed bug whereby joining a select() of a table "A" with multiple
foreign key paths to a table "B", to that table "B", would fail
to produce the "ambiguous join condition" error that would be
reported if you join table "A" directly to "B"; it would instead
produce a join condition with multiple criteria.
[ticket:2738]
Mike Bayer [Mon, 3 Jun 2013 20:40:59 +0000 (16:40 -0400)]
Fixed bug whereby using :meth:`.MetaData.reflect` across a remote
schema as well as a local schema could produce wrong results
in the case where both schemas had a table of the same name.
[ticket:2728]
Mike Bayer [Fri, 31 May 2013 15:52:31 +0000 (11:52 -0400)]
Fixed a regression caused by [ticket:2682] whereby the
evaluation invoked by :meth:`.Query.update` and :meth:`.Query.delete`
would hit upon unsupported ``True`` and ``False`` symbols
which now appear due to the usage of ``IS``.
[ticket:2737]
Mike Bayer [Fri, 31 May 2013 00:24:48 +0000 (20:24 -0400)]
Added a new method :meth:`.Query.select_entity_from` which
will in 0.9 replace part of the functionality of
:meth:`.Query.select_from`. In 0.8, the two methods perform
the same function, so that code can be migrated to use the
:meth:`.Query.select_entity_from` method as appropriate.
See the 0.9 migration guide for details.
[ticket:2736]
Mike Bayer [Wed, 29 May 2013 22:08:28 +0000 (18:08 -0400)]
hstores are text, and in py3k they seem to be implcitly unicode. so
add unicode encoding for py2k for the non-native hstore, pullreq for
native psycopg2 support coming....
Mike Bayer [Tue, 28 May 2013 05:22:10 +0000 (01:22 -0400)]
Fixed a small bug in the dogpile example where the generation
of SQL cache keys wasn't applying deduping labels to the
statement the same way :class:`.Query` normally does.
Mike Bayer [Thu, 23 May 2013 16:59:53 +0000 (12:59 -0400)]
Fixed a bug where the routine to detect the correct kwargs
being sent to :func:`.create_engine` would fail in some cases,
such as with the Sybase dialect.
[ticket:2732]
Mike Bayer [Mon, 13 May 2013 20:13:15 +0000 (16:13 -0400)]
Fixed a regression from 0.7 caused by this ticket, which
made the check for recursion overflow in self-referential
eager joining too loose, missing a particular circumstance
where a subclass had lazy="joined" or "subquery" configured
and the load was a "with_polymorphic" against the base.
[ticket:2481]
Mike Bayer [Tue, 30 Apr 2013 14:02:49 +0000 (10:02 -0400)]
- Fixed a regression from 0.7 where the contextmanager feature
of :meth:`.Session.begin_nested` would fail to correctly
roll back the transaction when a flush error occurred, instead
raising its own exception while leaving the session still
pending a rollback. [ticket:2718]
Mike Bayer [Mon, 29 Apr 2013 23:49:28 +0000 (19:49 -0400)]
Updated mysqlconnector dialect to check for disconnect based
on the apparent string message sent in the exception; tested
against mysqlconnector 1.0.9.
Mike Bayer [Fri, 26 Apr 2013 19:51:29 +0000 (15:51 -0400)]
Fixes to the ``sqlalchemy.ext.serializer`` extension, including
that the "id" passed from the pickler is turned into a string
to prevent against bytes being parsed on Py3K, as well as that
``relationship()`` and ``orm.join()`` constructs are now properly
serialized. [ticket:2698] and some other observed issues.
Mike Bayer [Thu, 25 Apr 2013 18:44:37 +0000 (14:44 -0400)]
- further cleanup. in particular, the left clause is never None. But we still
can have errors when we do the auto-join, these are both covered in test_joins
Mike Bayer [Wed, 24 Apr 2013 22:58:09 +0000 (18:58 -0400)]
- attempt to replace the whole idea of "join_to_left" with a more
fundamental and general purpose heuristic. this initial approach
has about 60 tests failing but seems to have gone pretty far
Mike Bayer [Tue, 23 Apr 2013 17:23:48 +0000 (13:23 -0400)]
Added a conditional to the unpickling process for ORM
mapped objects, such that if the reference to the object
were lost when the object was pickled, we don't
erroneously try to set up _sa_instance_state - fixes
a NoneType error.
Mike Bayer [Mon, 22 Apr 2013 23:33:39 +0000 (19:33 -0400)]
Opened up the checking for "disconnect" with psycopg2/libpq
to check for all the various "disconnect" messages within
the full exception hierarchy. Specifically the
"closed the connection unexpectedly" message has now been
seen in at least three different exception types.
[ticket:2712]