I see that foreign key properties (delete-orphan, etc) are defined when 
a mapper is created.  So I would think that the database options ON 
DELETE CASCADE, ON UPDATE CASCADE, etc. can't be defined in my table 
definitions such that when I issue the command metadata.create_all() the 
foreign keys on the server are configured.  True?

I don't want to make my tables rely on my application.  For example, if 
I manually (outside of SA) delete a parent record, the child records 
should also be deleted.  So is my only option for configuring my foreign 
keys on the backend to do so manually after metadata.create_all()?

It seems to me that the foreign key properties should be defined with 
the ForeignKey column in the table definition.  Maybe there is a good 
reason it isn't.  Please correct me if I've got the wrong idea about 
these things.

Randall



_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to