On Nov 15, 2008, at 6:03 AM, --- [EMAIL PROTECTED] --- wrote:

> i have tried giving cascade = 'a'',delete-orphan'
> but errors comes
>

you should use delete-orphan for that functionality.   If there are  
error messages, feel free to ask what they mean.

Also you have redundant relations set up, which shouldn't "break"  
anything but there's no need for them - "books<->tbl_stock" and  
"stock<->tbl_books" .   "tbl_books" represents the same thing as  
"books", and "tbl_stock" represents the same thing as "stock".   You  
only need a single relation() + backref(), "books<->stock".

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to