Mike Bayer [Sat, 8 Jun 2013 03:04:33 +0000 (23:04 -0400)]
- Fixed an obscure bug where the wrong results would be
fetched when joining/joinedloading across a many-to-many
relationship to a single-table-inheriting
subclass with a specific discriminator value, due to "secondary"
rows that would come back. The "secondary" and right-side
tables are now inner joined inside of parenthesis for all
ORM joins on many-to-many relationships so that the left->right
join can accurately filtered.
[ticket:2369]
Mike Bayer [Thu, 6 Jun 2013 22:06:02 +0000 (18:06 -0400)]
dial back the default "flatness" a bit, it will be there for joinedload and query.join(), but if
you're dealing with aliased() or with_polymorphic() you need to say "flat=True". Just the one
flag though, "flat" implies "aliased".
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 [Wed, 5 Jun 2013 01:36:34 +0000 (21:36 -0400)]
- add coverage for result map rewriting
- fix the result map rewriter for col mismatches, since the rewritten
select at the moment typically has more columns than the original
Mike Bayer [Tue, 4 Jun 2013 23:52:53 +0000 (19:52 -0400)]
- if the select() does not have use_labels on, then we just render
the joins as is, regardless of the dialect not supporting it. use_labels=True
indicates a higher level of automation and also can maintain the labels
between rewritten and not. use_labels=False indicates a manual use case.
Mike Bayer [Tue, 4 Jun 2013 22:23:06 +0000 (18:23 -0400)]
- improve overlapping selectables, apply to both query and relationship
- clean up inspect() calls within query._join()
- make sure join.alias(flat) propagates
- fix almost all assertion tests
Mike Bayer [Tue, 4 Jun 2013 20:21:25 +0000 (16:21 -0400)]
here's the flat join thing. it just works. Changing the existing compiled SQL assertions
might even be most of the tests we need (though dedicated sql tests would be needed anyway)
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 [Sun, 2 Jun 2013 16:06:39 +0000 (12:06 -0400)]
- blow away context._attributes
- to account for query._attributes/context.attributes, just pass
the attributes dict directly to the PathRegistry methods
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:09:44 +0000 (20:09 -0400)]
The "auto-aliasing" behavior of the :class:`.Query.select_from`
method has been turned off. The specific behavior is now
availble via a new method :class:`.Query.select_entity_from`.
[ticket:2736]
Mike Bayer [Thu, 30 May 2013 19:56:00 +0000 (15:56 -0400)]
- the distinct hash code logic here is entirely obsolete as you can
do eq_() on columnelements now with a meaningful bool; jython is entirely a
non-starter right now in any case as 2.7 doesn't support common accessors like __defaults__
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 [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 [Mon, 27 May 2013 21:06:05 +0000 (17:06 -0400)]
- additional oracle fixes. cx_oracle under py3k is complaining about tuples to executemany(),
so just unconditionally turn this into a list
- this one test segfaults only on py3k + cx_oracle