Commit Graph

7 Commits

Author SHA1 Message Date
Mike Bayer 5508388f03 - The :mod:sqlalchemy.ext.automap extension will now set
``cascade="all, delete-orphan"`` automatically on a one-to-many
relationship/backref where the foreign key is detected as containing
one or more non-nullable columns.  This argument is present in the
keywords passed to :func:`.automap.generate_relationship` in this
case and can still be overridden.  Additionally, if the
:class:`.ForeignKeyConstraint` specifies ``ondelete="CASCADE"``
for a non-nullable or ``ondelete="SET NULL"`` for a nullable set
of columns, the argument ``passive_deletes=True`` is also added to the
relationship.  Note that not all backends support reflection of
ondelete, but backends that do include Postgresql and MySQL.
fixes #3210
2014-09-22 23:00:45 -04:00
Mike Bayer 1dacbb25f8 pep8/flake8 2014-09-22 22:22:09 -04:00
Mike Bayer 9c96d96d0f - fix this test for MySQL, needs InnoDB 2014-05-30 18:09:11 -04:00
Matthias Urlichs f341cfbfe1 Documentation fix-up: "its" vs. "it's"
Removed ungrammatical apostrophes from documentation, replacing
"it's" with "its" where appropriate (but in a few cases with "it is"
when that read better).

While doing that, I also fixed a couple of minor typos etc.
as I noticed them.
2014-05-11 16:49:56 +02:00
Mike Bayer 4d93a52e77 - Added support to automap for the case where a relationship should
not be created between two classes that are in a joined inheritance
relationship, for those foreign keys that link the subclass back to
the superclass.
fixes #3004
2014-03-28 10:49:37 -04:00
Mike Bayer ee88e648f7 - Fixed bug where the :class:.AutomapBase class of the
new automap extension would fail if classes
were pre-arranged in single or potentially joined inheritance patterns.
The repaired joined inheritance issue could also potentially apply when
using :class:`.DeferredReflection` as well.
2014-02-08 21:24:13 -05:00
Mike Bayer 21bc2c2a5b - docs + tests 2014-01-05 16:48:01 -05:00