diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-01-20 21:35:57 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-01-20 21:35:57 +0000 |
commit | 7c56371f81707b5979249b2f2b056f65488f1bab (patch) | |
tree | 3d2d9cc427e8095e453327c56bca4b1c7fa36d20 /lib/sqlalchemy/databases/mssql.py | |
parent | 9fc05aae02015011052ad0da2bd602951b12c071 (diff) | |
download | sqlalchemy-7c56371f81707b5979249b2f2b056f65488f1bab.tar.gz |
- Further refined 0.5.1's warning about delete-orphan cascade
placed on a many-to-many relation. First, the bad news:
the warning will apply to both many-to-many as well as
many-to-one relations. This is necessary since in both
cases, SQLA does not scan the full set of potential parents
when determining "orphan" status - for a persistent object
it only detects an in-python de-association event to establish
the object as an "orphan". Next, the good news: to support
one-to-one via a foreign key or assocation table, or to
support one-to-many via an association table, a new flag
single_parent=True may be set which indicates objects
linked to the relation are only meant to have a single parent.
The relation will raise an error if multiple parent-association
events occur within Python.
- Fixed bug in delete-orphan cascade whereby two one-to-one
relations from two different parent classes to the same target
class would prematurely expunge the instance. This is
an extension of the non-ticketed fix in r4247.
- the order of "sethasparent" flagging in relation to
AttributeExtensions has been refined such that false setparents
are issued before the event, true setparents issued afterwards.
event handlers "know" that a remove event originates
from a non-orphan but need to know if its become an orphan,
and that append events will become non-orphans but need to know
if the event originates from a non-orphan.
Diffstat (limited to 'lib/sqlalchemy/databases/mssql.py')
0 files changed, 0 insertions, 0 deletions