Re: [sqlalchemy] Relationship between two models without constraints or cascades

2021-03-14 Thread Mike Bayer
I also intended to mention there's an option that might work here, though im not sure, which is to set passive_deletes='all' on both sides , which disables this "nulling out" operation, not sure if it will go all the way for the primary key columns here but it's worth a try: https://docs.sqlalc

Re: [sqlalchemy] Relationship between two models without constraints or cascades

2021-03-14 Thread Mike Bayer
On Sun, Mar 14, 2021, at 7:49 AM, Jack Matthews wrote: > The database I am trying to maintain is a representation of a configuration > file I have scraped from a network device. I have two models that when both > exist in the configuration are related to each other, but it is also possible > t

[sqlalchemy] Relationship between two models without constraints or cascades

2021-03-14 Thread Jack Matthews
The database I am trying to maintain is a representation of a configuration file I have scraped from a network device. I have two models that when both exist in the configuration are related to each other, but it is also possible that one or the other may not be present. The schemas are included