marcpage / scheduling

Restaurant staff scheduling website
The Unlicense
3 stars 4 forks source link

Relationship between User.gm_at, restaurant.gm_id, and Restaurant.gm needs to be fixed #15

Closed marcpage closed 2 years ago

marcpage commented 2 years ago

SAWarning: relationship 'User.gm_at' will copy column user.id to column restaurant.gm_id, which conflicts with relationship(s): 'Restaurant.gm' (copies user.id to restaurant.gm_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="gm"' to the 'User.gm_at' relationship. (Background on this error at: https://sqlalche.me/e/14/qzyx)

marcpage commented 2 years ago

Added , viewonly=True when User.gm_at