Look into Flask Warning
charliegriefer opened this issue · 1 comments
SAWarning: relationship 'Distillery.bottles' will copy column distillery.id to column bottle.distillery_id, which conflicts with relationship(s): 'Bottle.distillery' (copies distillery.id to bottle.distillery_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards. To silence this warning, add the parameter 'overlaps="distillery"' to the 'Distillery.bottles' relationship. (Background on this error at: https://sqlalche.me/e/20/qzyx) (This warning originated from the configure_mappers()
process, which was invoked automatically in response to a user-initiated operation.)
We seem to have this under control now by implementing "back_populates" values into the relationships.
It didn't fix the cpu spikes as I'd hoped it would... but I haven't seen any more of these warnings in quite some time.