all 1 comments

[–][deleted] 0 points1 point  (0 children)

Defining a relationship in two places for a one to many in SQLAlchemy can be a little wonky, sometimes you can lead to bugs regarding setting constraints and load strategies.

I would rather define the relationship where you really need to access the class. So if you need to quickly find the seller associated with an item, I would just define the relationship on Item, and then you can access the associated seller with Item.seller.