💭 python - Concepts of backref and back_populate in SQLalchemy? ... =================================================================== !https://stackoverflow.com/questions/51335298/concepts-of-backref-and-back-populate-in-sqlalchemy#answer-59920780 Date: March 6, 2024 Concepts of backref and back_populate in SQLalchemy? Can anyone explain the concepts of these two ideas and how they relate to making relationships between tables? I can't really seem to find anything that explains it clearly and the documentation fe... Stack Overflow · stackoverflow.com [1] Today I came across some sqlalchemy models that created some relationships, some used `backref` some used `back_populates`. I was stumped why, I had never came accross `backref` before and I felt skill issues sinking in. ## backref is considered legacy https://docs.sqlalchemy.org/en/14/orm/backref.html As stated in the sqlalchemy docs, backref is a legacy feature. Its shorthand to creating relationships between parent and child, but only adding it to the parent. While this is simpler it introduces some invisible magic. !!! note This post is a thought [2]. It's a short note that I make about someone else's content online #thoughts [3] References: [1]: https://stackoverflow.com/questions/51335298/concepts-of-backref-and-back-populate-in-sqlalchemy#answer-59920780 [2]: /thoughts/ [3]: /tags/thoughts/