We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b81b1cc commit 512482cCopy full SHA for 512482c
tests/test_main.py
@@ -94,7 +94,7 @@ class Hero(SQLModel, table=True):
94
session.refresh(hero_2)
95
96
97
-def test_sa_relationship(clear_sqlmodel):
+def test_sa_relationship_property(clear_sqlmodel):
98
"""Test https://github.com/tiangolo/sqlmodel/issues/315#issuecomment-1272122306"""
99
100
class Team(SQLModel, table=True):
@@ -124,4 +124,5 @@ class Hero(SQLModel, table=True):
124
session.commit()
125
session.refresh(hero_rusty_man)
126
# The next statement should not raise an AttributeError
127
+ assert hero_rusty_man.team
128
assert hero_rusty_man.team.name == "Preventers"
0 commit comments