Mike Bayer [Tue, 9 Apr 2013 15:52:21 +0000 (11:52 -0400)]
Fixed bug when a query of the form:
``query(SubClass).options(subqueryload(Baseclass.attrname))``,
where ``SubClass`` is a joined inh of ``BaseClass``,
would fail to apply the ``JOIN`` inside the subquery
on the attribute load, producing a cartesian product.
The populated results still tended to be correct as additional
rows are just ignored, so this issue may be present as a
performance degradation in applications that are
otherwise working correctly. [ticket:2699]
Mike Bayer [Mon, 1 Apr 2013 17:37:35 +0000 (13:37 -0400)]
- Fixed bug in unit of work whereby a joined-inheritance
subclass could insert the row for the "sub" table
before the parent table, if the two tables had no
ForeignKey constraints set up between them.
Also in 0.7.11. [ticket:2689]
- fix a glitch in the assertsql.CompiledSQL fixture regarding
when a multiparam compiledSQL is used within an AllOf
- add a new utility function randomize_unitofwork() which
does the function of --reversetop
Mike Bayer [Sun, 24 Mar 2013 18:31:48 +0000 (14:31 -0400)]
- add an event to testing so that other dialects can intercept "test_needs_autoincrement"
- get the assumption of "1" for "first sequence item" to be dialect configured
Mike Bayer [Sun, 24 Mar 2013 17:50:56 +0000 (13:50 -0400)]
Loosened the check on dialect-specific argument names
passed to Table(); since we want to support external dialects
and also want to support args without a certain dialect
being installed, it only checks the format of the arg now,
rather than looking for that dialect in sqlalchemy.dialects.
Mike Bayer [Sat, 23 Mar 2013 23:00:11 +0000 (19:00 -0400)]
Fixed bug whereby a DBAPI that can return "0"
for cursor.lastrowid would not function correctly
in conjunction with :attr:`.ResultProxy.inserted_primary_key`.
Mike Bayer [Mon, 11 Mar 2013 18:44:26 +0000 (14:44 -0400)]
- repair doctest for SQL expression tutorial
- remove most use of "whereclause" and "from_obj", not done yet,
part of [ticket:2679]
- add links to method chained versions for all Select.append_XYZ()
calls
- add "method chaining" and "generative" to glossary
Mike Bayer [Sat, 9 Mar 2013 22:40:06 +0000 (17:40 -0500)]
Added support for Postgresql's traditional SUBSTRING
function syntax, renders as "SUBSTRING(x FROM y FOR z)"
when regular ``func.substring()`` is used.
Also in 0.7.11. Courtesy Gunnlaugur Por Briem.
[ticket:2676]
Mike Bayer [Sat, 9 Mar 2013 22:26:16 +0000 (17:26 -0500)]
- remove all compat items that are pre-2.5 (hooray)
- other cleanup
- don't need compat.decimal, that approach never panned out. hopefully
outside libs aren't pulling it in, they shouldn't be
Mike Bayer [Sat, 9 Mar 2013 18:24:54 +0000 (13:24 -0500)]
A meaningful :attr:`.QueryableAttribute.info` attribute is
added, which proxies down to the ``.info`` attribute on either
the :class:`.schema.Column` object if directly present, or
the :class:`.MapperProperty` otherwise. The full behavior
is documented and ensured by tests to remain stable.
[ticket:2675]
Mike Bayer [Sat, 9 Mar 2013 17:12:01 +0000 (12:12 -0500)]
- the base correlate tests in test_compiler cover the ones that were here
for now
- fix up adaptation tests to still try to exercise the correlation argument
Mike Bayer [Sat, 9 Mar 2013 16:46:44 +0000 (11:46 -0500)]
- since correlation is now always at least semi-automatic, remove the
ability for correlation to have any effect for a SELECT that's stated
in the FROM.
- add a new exhaustive test suite for correlation to test_compiler
Mike Bayer [Mon, 4 Mar 2013 17:50:11 +0000 (12:50 -0500)]
- add some more transaction states so that we deliver a more accurate
message for [ticket:2662]; after_commit() is called within "committed"
state, not prepared, and no SQL can be emitted for prepared or committed
- consolidate state assertions in session transaction, use just one
method
- add more unit tests for these assertions
Mike Bayer [Sun, 3 Mar 2013 18:51:54 +0000 (13:51 -0500)]
- Improved checking for an existing backref name conflict during
mapper configuration; will now test for name conflicts on
superclasses and subclasses, in addition to the current mapper,
as these conflicts break things just as much. This is new for
0.8, but see below for a warning that will also be triggered
in 0.7.11.
- Improved the error message emitted when a "backref loop" is detected,
that is when an attribute event triggers a bidirectional
assignment between two other attributes with no end.
This condition can occur not just when an object of the wrong
type is assigned, but also when an attribute is mis-configured
to backref into an existing backref pair. Also in 0.7.11.
- A warning is emitted when a MapperProperty is assigned to a mapper
that replaces an existing property, if the properties in question
aren't plain column-based properties. Replacement of relationship
properties is rarely (ever?) what is intended and usually refers to a
mapper mis-configuration. Also in 0.7.11.
[ticket:2674]
Mike Bayer [Sun, 3 Mar 2013 01:27:53 +0000 (20:27 -0500)]
Can set/change the "cascade" attribute on a :func:`.relationship`
construct after it's been constructed already. This is not
a pattern for normal use but we like to change the setting
for demonstration purposes in tutorials.
Mike Bayer [Sat, 2 Mar 2013 22:47:58 +0000 (17:47 -0500)]
- :meth:`.MetaData.create_all` and :meth:`.MetaData.drop_all` will
now accommodate an empty list as an instruction to not create/drop
any items, rather than ignoring the collection. [ticket:2664].
This is a behavioral change and extra notes to the changelog
and migration document have been added.
- create a new test suite for exercising codepaths
in engine/ddl.py
Mike Bayer [Sat, 2 Mar 2013 21:20:49 +0000 (16:20 -0500)]
- Fixed an import of "logging" in test_execute which was not
working on some linux platforms. Also in 0.7.11.
- only need "logging.handlers" here, "logging" comes in implicitly