See
http://www.sqlalchemy.org/docs/05/metadata.html#on-update-and-on-delete as
well as
http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/schema.html?highlight=foreignkey#sqlalchemy.schema.ForeignKey
.



mhearne808[insert-at-sign-here]gmail[insert-dot-here]com wrote:
>
> Hello - I am developing the back-end of an application using Python
> and SQLAlchemy.  The web-based (PHP, etc.) administrative front-end to
> the application is the responsibility of another developer.  The point
> of commonality between the two is the database.
>
> I have already figured out how to have cascade on delete functionality
> happen using SQLAlchemy.  However, defining this using the Python code
> (using the mapper() function) doesn't seem to pass the cascade
> constraint (I hope that's the correct use for that term) to MySQL.
> Thus, if my PHP-using compatriot wants to have the cascade
> functionality on _his_ side of the application, he is forced to:
>
> A) Code the cascade logic into his PHP code OR
> B) Modify the database after I have created it to include these
> contraints on the columns.
>
> Is there a way for me to specify the cascade functionality on a
> relation between two tables using SQLAlchemy, in such a way that I am:
>
> 1) Using database independent Python code AND
> 2) Causing the MySQL engine to recognize that cascade functionality?
>
> Thanks,
>
> Mike
> >
>


--~--~---------~--~----~------------~-------~--~----~
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 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

  • [sqlalchemy] MYSQ... mhearne808[insert-at-sign-here]gmail[insert-dot-here]com
    • [sqlalchemy]... Michael Bayer

Reply via email to