<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-18508356.post2493185480699047090..comments</id><updated>2009-05-05T13:32:07.332-04:00</updated><category term='linux'/><category term='hygiene'/><category term='cascade'/><category term='python programming'/><category term='javascript'/><category term='flot'/><category term='wxwindows'/><category term='REST'/><category term='dynamic'/><category term='ajax'/><category term='programming'/><category term='macros'/><category term='sqlalchemy'/><category term='pymongo'/><category term='sourceforge'/><category term='decorator'/><category term='10gen'/><category term='wxpython'/><category term='lisp'/><category term='websockets'/><category term='mongodb'/><category term='pycon'/><category term='mapreduce'/><category term='metapython'/><category term='posgresql'/><category term='descriptor'/><category term='grok'/><category term='zeromq'/><category term='gevent'/><category term='python'/><category term='cherrypy'/><category term='zope'/><category term='turbogears'/><category term='aggregation'/><category term='ming'/><category term='zarkov'/><category term='datalog'/><category term='json'/><category term='socket.io'/><category term='compiler'/><title type='text'>Comments on Just a little Python: Cascade Rules in SQLAlchemy</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.pythonisito.com/feeds/2493185480699047090/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18508356/2493185480699047090/comments/default'/><link rel='alternate' type='text/html' href='http://blog.pythonisito.com/2008/07/cascade-rules-in-sqlalchemy.html'/><author><name>Rick Copeland</name><uri>http://www.blogger.com/profile/11612114223288841087</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_nBbh7fCcv1w/SLBwYXLKA2I/AAAAAAAAABM/EgRC77lqhr0/S220/headshot_enhanced.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-18508356.post-5643721202307749344</id><published>2009-05-05T13:32:00.000-04:00</published><updated>2009-05-05T13:32:00.000-04:00</updated><title type='text'>Thanks for the comment!  My post was assuming you ...</title><content type='html'>Thanks for the comment!  My post was assuming you want to delete the children when you delete the parent, but as you mentioned, you can keep the children around by omitting the cascade= argument.  Thanks again!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18508356/2493185480699047090/comments/default/5643721202307749344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18508356/2493185480699047090/comments/default/5643721202307749344'/><link rel='alternate' type='text/html' href='http://blog.pythonisito.com/2008/07/cascade-rules-in-sqlalchemy.html?showComment=1241544720000#c5643721202307749344' title=''/><author><name>Rick Copeland</name><uri>http://www.blogger.com/profile/11612114223288841087</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_nBbh7fCcv1w/SLBwYXLKA2I/AAAAAAAAABM/EgRC77lqhr0/S220/headshot_enhanced.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.pythonisito.com/2008/07/cascade-rules-in-sqlalchemy.html' ref='tag:blogger.com,1999:blog-18508356.post-2493185480699047090' source='http://www.blogger.com/feeds/18508356/posts/default/2493185480699047090' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1701900629'/></entry><entry><id>tag:blogger.com,1999:blog-18508356.post-2702080547802763959</id><published>2009-05-05T12:00:00.000-04:00</published><updated>2009-05-05T12:00:00.000-04:00</updated><title type='text'>found this on google - it was kinda helpfull but i...</title><content type='html'>found this on google - it was kinda helpfull but i missed one thing:&lt;br /&gt;how to delete a parent without automatically deleting the childs&lt;br /&gt;(solution below)&lt;br /&gt;&lt;br /&gt;----&lt;br /&gt;&lt;br /&gt;after more research etc. i tried the param &lt;B&gt;passive_deletes=True&lt;/B&gt; at first:&lt;br /&gt;mapper(ParentClass, parent, properties=dict(children=relation(ChildClass, backref='parent', cascade='all',&lt;br /&gt;passive_deletes=True)))&lt;br /&gt;&lt;br /&gt;but this got me an exception as follows:&lt;br /&gt;    *  Module sqlalchemy.orm.session, line 789, in flush&lt;br /&gt;    * Module sqlalchemy.orm.unitofwork, line 233, in flush&lt;br /&gt;    * Module sqlalchemy.orm.unitofwork, line 437, in execute&lt;br /&gt;    * Module sqlalchemy.orm.unitofwork, line 888, in preexecute&lt;br /&gt;    * Module sqlalchemy.orm.dependency, line 347, in preprocess_dependencies&lt;br /&gt;&lt;br /&gt;TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType' (Also, errors occurred while attempting to render the primary and secondary standard error message.)&lt;br /&gt;&lt;br /&gt;i dont really investigated this&lt;br /&gt;&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;later i found the solution&lt;br /&gt;it's so simple that i feel like wasted the last 2hours -_-&lt;br /&gt;&lt;br /&gt;&lt;B&gt;just dont use the param cascade at all&lt;/B&gt;:&lt;br /&gt;mapper(ParentClass, parent, properties=dict(children=relation(ChildClass, backref=&amp;#39;parent&amp;#39;))&lt;br /&gt;&lt;br /&gt;kind regards :&amp;gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18508356/2493185480699047090/comments/default/2702080547802763959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18508356/2493185480699047090/comments/default/2702080547802763959'/><link rel='alternate' type='text/html' href='http://blog.pythonisito.com/2008/07/cascade-rules-in-sqlalchemy.html?showComment=1241539200000#c2702080547802763959' title=''/><author><name>Jogi</name><uri>http://www.blogger.com/profile/00254182711352368618</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='08998140532960204092'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.pythonisito.com/2008/07/cascade-rules-in-sqlalchemy.html' ref='tag:blogger.com,1999:blog-18508356.post-2493185480699047090' source='http://www.blogger.com/feeds/18508356/posts/default/2493185480699047090' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-518029246'/></entry></feed>
