On Sep 22, 2006, at 11:56 PM, Mongoose wrote:

> But...
> http://www.sqlalchemy.org/docs/ 
> adv_datamapping.myt#advdatamapping_recursive
>
> That example right there establishes delete-orphan on a self  
> referential relationship.  Is it outdated?

yes.  delete-orphan behavior has been "corrected" in recent releases  
to work more completely.

> If I were a post, must I manually recurse through all my kits  
> before deleting myself?

no.  the "delete" cascade, which is part of "all", will do what you  
want.

> I'll leave off the delete-orphan part for now, and manually  
> recurse, but it does seem curious to see such an error.

"delete-orphan" would mean that a Post object which does not have a  
parent Post object would not be allowed to exist.  which in the case  
of a tree structure makes no sense since there could then be no root.

p.s. i took out the "delete-orphan" from the self-referential docs.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to