summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/mysql/pymysql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-10-30 15:10:56 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2011-10-30 15:10:56 -0400
commitacc5277a811576a302465225e4e715b0c4c42c91 (patch)
tree45c8b3fc4afe2ef92825346cfbc261206cf16d8c /lib/sqlalchemy/dialects/mysql/pymysql.py
parente6a5ea8fa7d10078c8d3f1bf6cabc4399cac3e70 (diff)
downloadsqlalchemy-acc5277a811576a302465225e4e715b0c4c42c91.tar.gz
- attribute system gets a pop() method.
- remove() on a scalar object will raise if the object removed is not what was present. - InstanceState can be pickled if obj() is None; this to support the other changes in this commit - only use trackparent flag on attributes if single_parent or ONETOMANY; otherwise we can skip this overhead - attribute hasparent()/sethasparent() check that trackparent is set, else their usage is invalid - [bug] Fixed backref behavior when "popping" the value off of a many-to-one in response to a removal from a stale one-to-many - the operation is skipped, since the many-to-one has since been updated. [ticket:2315] - [bug] After some years of not doing this, added more granularity to the "is X a parent of Y" functionality, which is used when determining if the FK on "Y" needs to be "nulled out" as well as if "Y" should be deleted with delete-orphan cascade. The test now takes into account the Python identity of the parent as well its identity key, to see if the last known parent of Y is definitely X. If a decision can't be made, a StaleDataError is raised. The conditions where this error is raised are fairly rare, requiring that the previous parent was garbage collected, and previously could very well inappropriately update/delete a record that's since moved onto a new parent, though there may be some cases where "silent success" occurred previously that will now raise in the face of ambiguity. Expiring "Y" resets the "parent" tracker, meaning X.remove(Y) could then end up deleting Y even if X is stale, but this is the same behavior as before; it's advised to expire X also in that case. [ticket:2264]
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql/pymysql.py')
0 files changed, 0 insertions, 0 deletions