Mike Bayer [Sat, 24 Aug 2013 15:30:57 +0000 (11:30 -0400)]
- this comment is wrong, the method here returns all mapper entities
- use a simple isinstance() check instead of looking for presence of
"primary_entity" flag, that's a little unclear
Mike Bayer [Tue, 20 Aug 2013 17:27:27 +0000 (13:27 -0400)]
Fixed bug where list instrumentation would fail to represent a
setslice of ``[0:0]`` correctly, which in particular could occur
when using ``insert(0, item)`` with the association proxy. Due
to some quirk in Python collections, the issue was much more likely
with Python 3 rather than 2. Also in 0.8.3, 0.7.11.
[ticket:2807]
Mike Bayer [Sun, 18 Aug 2013 18:46:04 +0000 (14:46 -0400)]
Fixed regression dating back to 0.7.9 whereby the name of a CTE might
not be properly quoted if it was referred to in multiple FROM clauses.
Also in 0.8.3, 0.7.11. [ticket:2801]
Mike Bayer [Wed, 31 Jul 2013 22:42:58 +0000 (18:42 -0400)]
- Fixed bug in common table expression system where if the CTE were
used only as an ``alias()`` construct, it would not render using the
WITH keyword.
[ticket:2783]
Mike Bayer [Wed, 17 Jul 2013 15:18:59 +0000 (11:18 -0400)]
Fixed bug in :class:`.CheckConstraint` DDL where the "quote" flag from a
:class:`.Column` object would not be propagated. Also in 0.8.3, 0.7.11.
[ticket:2784]
Mike Bayer [Tue, 9 Apr 2013 15:58:59 +0000 (11:58 -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:54:09 +0000 (13:54 -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. [ticket:2689]
- fixed glitch in assertsql.py regarding CompiledSQL + AllOf +
multiple params
Mike Bayer [Sat, 9 Mar 2013 22:41:32 +0000 (17:41 -0500)]
Added support for Postgresql's traditional SUBSTRING
function syntax, renders as "SUBSTRING(x FROM y FOR z)"
when regular ``func.substring()`` is used.
Courtesy Gunnlaugur Por Briem.
[ticket:2676]
Mike Bayer [Sun, 3 Mar 2013 18:59:12 +0000 (13:59 -0500)]
- 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.
- 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. This will also warn if a backref configures
itself on top of an existing one in an inheritance relationship
(which is an error in 0.8).
backport for [ticket:2674]
Mike Bayer [Sun, 3 Feb 2013 02:03:57 +0000 (21:03 -0500)]
Added a conditional import to the ``gaerdbms`` dialect which attempts
to import rdbms_apiproxy vs. rdbms_googleapi to work
on both dev and production platforms. Also now honors the
``instance`` attribute. Courtesy Sean Lynch. Also backported
enhancements to allow username/password as well as
fixing error code interpretation from 0.8.
[ticket:2649]
Mike Bayer [Sat, 2 Feb 2013 22:00:32 +0000 (17:00 -0500)]
Backported adjustment to ``__repr__`` for
:class:`.TypeDecorator` to 0.7, allows :class:`.PickleType`
to produce a clean ``repr()`` to help with Alembic.
[ticket:2594] [ticket:2584]
Mike Bayer [Sun, 27 Jan 2013 16:24:45 +0000 (11:24 -0500)]
Fixed bug where :meth:`.Table.tometadata` would fail if a
:class:`.Column` had both a foreign key as well as an
alternate ".key" name for the column.
[ticket:2643]
Mike Bayer [Sat, 12 Jan 2013 22:32:32 +0000 (17:32 -0500)]
Fixed potential memory leak which could occur if an
arbitrary number of :func:`.sessionmaker` objects
were created. The anonymous subclass created by
the sessionmaker, when dereferenced, would not be garbage
collected due to remaining class-level references from the
event package. This issue also applies to any custom system
that made use of ad-hoc subclasses in conjunction with
an event dispatcher. [ticket:2650]
Mike Bayer [Fri, 14 Dec 2012 15:32:56 +0000 (10:32 -0500)]
More adjustment to this SQLite related issue which was released in
0.7.9, to intercept legacy SQLite quoting characters when reflecting
foreign keys. In addition to intercepting double quotes, other
quoting characters such as brackets, backticks, and single quotes
are now also intercepted. [ticket:2568]
Mike Bayer [Sun, 9 Dec 2012 01:31:06 +0000 (20:31 -0500)]
Fixed bug where using server_onupdate=<FetchedValue|DefaultClause>
without passing the "for_update=True" flag would apply the default
object to the server_default, blowing away whatever was there.
The explicit for_update=True argument shouldn't be needed with this usage
(especially since the documentation shows an example without it being
used) so it is now arranged internally using a copy of the given default
object, if the flag isn't set to what corresponds to that argument.
[ticket:2631]
Mike Bayer [Fri, 7 Dec 2012 00:32:58 +0000 (19:32 -0500)]
The Oracle LONG type, while an unbounded text type, does not appear
to use the cx_Oracle.LOB type when result rows are returned,
so the dialect has been repaired to exclude LONG from
having cx_Oracle.LOB filtering applied.
[ticket:2620]
Mike Bayer [Fri, 7 Dec 2012 00:14:12 +0000 (19:14 -0500)]
Repaired the usage of ``.prepare()`` in conjunction with
cx_Oracle so that a return value of ``False`` will result
in no call to ``connection.commit()``, hence avoiding
"no transaction" errors. Two-phase transactions have
now been shown to work in a rudimental fashion with
SQLAlchemy and cx_oracle, however are subject to caveats
observed with the driver; check the documentation
for details. [ticket:2611]
Mike Bayer [Tue, 4 Dec 2012 00:56:55 +0000 (19:56 -0500)]
The :class:`.MutableComposite` type did not allow for the
:meth:`.MutableBase.coerce` method to be used, even though
the code seemed to indicate this intent, so this now works
and a brief example is added. As a side-effect,
the mechanics of this event handler have been changed so that
new :class:`.MutableComposite` types no longer add per-type
global event handlers. Also in 0.8.0b2.
[ticket:2624]
Mike Bayer [Wed, 14 Nov 2012 05:51:38 +0000 (00:51 -0500)]
Fixed :meth:`.MetaData.reflect` to correctly use
the given :class:`.Connection`, if given, without
opening a second connection from that connection's
:class:`.Engine`. [ticket:2604]
Mike Bayer [Wed, 14 Nov 2012 04:45:52 +0000 (23:45 -0500)]
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.
[ticket:2607]
Mike Bayer [Wed, 10 Oct 2012 17:22:57 +0000 (13:22 -0400)]
- [bug] changed the list of cx_oracle types that are
excluded from the setinputsizes() step to only include
STRING and UNICODE; CLOB and NCLOB are removed. This
is to work around cx_oracle behavior which is broken
for the executemany() call. In 0.8, this same change
is applied however it is also configurable via the
exclude_setinputsizes argument. [ticket:2561]
Mike Bayer [Wed, 3 Oct 2012 15:06:22 +0000 (11:06 -0400)]
- [bug] Fixed Session accounting bug whereby replacing
a deleted object in the identity map with another
object of the same primary key would raise a
"conflicting state" error on rollback(),
if the replaced primary key were established either
via non-unitofwork-established INSERT statement
or by primary key switch of another instance.
[ticket:2583]
Mike Bayer [Sun, 30 Sep 2012 21:20:04 +0000 (17:20 -0400)]
- [bug] Fixed bug in over() construct whereby
passing an empty list for either partition_by
or order_by, as opposed to None, would fail
to generate correctly.
Courtesy Gunnlaugur Por Briem.
[ticket:2574]
Mike Bayer [Sun, 30 Sep 2012 20:57:23 +0000 (16:57 -0400)]
- [bug] Fixed compiler bug whereby using a correlated
subquery within an ORDER BY would fail to render correctly
if the stament also used LIMIT/OFFSET, due to mis-rendering
within the ROW_NUMBER() OVER clause. Fix courtesy
sayap [ticket:2538]
Mike Bayer [Tue, 25 Sep 2012 20:54:50 +0000 (16:54 -0400)]
- [bug] Added 'terminating connection' to the list
of messages we use to detect a disconnect with PG, which
appears to be present in some versions when the server
is restarted. [ticket:2570]
Mike Bayer [Sun, 23 Sep 2012 17:42:41 +0000 (13:42 -0400)]
- [bug] Columns in reflected primary key constraint
are now returned in the order in which the constraint
itself defines them, rather than how the table
orders them. Courtesy Gunnlaugur Por Briem.
[ticket:2531].
Mike Bayer [Sun, 23 Sep 2012 16:51:24 +0000 (12:51 -0400)]
- [bug] When the primary key column of a Table
is replaced, such as via extend_existing,
the "auto increment" column used by insert()
constructs is reset. Previously it would
remain referring to the previous primary
key column. [ticket:2525]
Mike Bayer [Sun, 23 Sep 2012 15:30:07 +0000 (11:30 -0400)]
- [bug] Adjusted column default reflection code to
convert non-string values to string, to accommodate
old SQLite versions that don't deliver
default info as a string. [ticket:2265]
- factor sqlite column reflection to be like we did for postgresql,
in a separate method.
Mike Bayer [Sat, 22 Sep 2012 20:31:32 +0000 (16:31 -0400)]
- [bug] Added missing operators is_(), isnot()
to the ColumnOperators base, so that these long-available
operators are present as methods like all
the other operators. [ticket:2544]
Mike Bayer [Sat, 22 Sep 2012 20:03:57 +0000 (16:03 -0400)]
- [bug] Extra logic has been added to the "flush"
that occurs within Session.commit(), such that the
extra state added by an after_flush() or
after_flush_postexec() hook is also flushed in a
subsequent flush, before the "commit" completes.
Subsequent calls to flush() will continue until
the after_flush hooks stop adding new state.
An "overflow" counter of 100 is also in place,
in the event of a broken after_flush() hook
adding new content each time. [ticket:2566]
Mike Bayer [Thu, 20 Sep 2012 16:05:16 +0000 (12:05 -0400)]
- repair bool() for instance level event listener where events are classlevel, continuing [ticket:2516],
for some reason the impl was different here than that of 0.8
Mike Bayer [Wed, 19 Sep 2012 04:34:30 +0000 (00:34 -0400)]
- [bug] Adjusted a very old bugfix which attempted
to work around a SQLite issue that itself was
"fixed" as of sqlite 3.6.14, regarding quotes
surrounding a table name when using
the "foreign_key_list" pragma. The fix has been
adjusted to not interfere with quotes that
are *actually in the name* of a column or table,
to as much a degree as possible; sqlite still
doesn't return the correct result for foreign_key_list()
if the target table actually has quotes surrounding
its name, as *part* of its name (i.e. """mytable""").
[ticket:2568]
Mike Bayer [Mon, 17 Sep 2012 01:15:55 +0000 (21:15 -0400)]
- [bug] Fixed bug where incorrect type information
would be passed when the ORM would bind the
"version" column, when using the "version" feature.
Tests courtesy Daniel Miller. [ticket:2539]
Mike Bayer [Sun, 9 Sep 2012 06:06:32 +0000 (02:06 -0400)]
almost obliterate the concept of "implicit execution" from the docs, move it only
to the "engines and connections" chapter nobody reads, put big green "note:"
boxes with the word "discouraged" in them for "bound metadata", "implicit execution",
"threadlocal strategy"