diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-09-22 23:00:45 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-09-22 23:00:45 -0400 |
commit | 5508388f0325ea75d311a2ef7ee4cbd6b1b8f354 (patch) | |
tree | 6daed1d24ebfc49506c1ac1232a4988213ee908f /lib/sqlalchemy/testing/engines.py | |
parent | 1dacbb25f86f828ab5df6b6424f4eb7f402a356e (diff) | |
download | sqlalchemy-5508388f0325ea75d311a2ef7ee4cbd6b1b8f354.tar.gz |
- 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
Diffstat (limited to 'lib/sqlalchemy/testing/engines.py')
0 files changed, 0 insertions, 0 deletions