Relationship problem "When initializing mapper" #900
Replies: 1 comment 2 replies
-
here is the problem. from future import annotations if TYPE_CHECKING: to keep the type, idk why, all was broken. removing it, all works. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First Check
Commit to Help
Example Code
Description
at the frist query i get this message.
When initializing mapper Mapper[User(users)], expression "relationship("list['Product']")" seems to be using a generic class as the argument to relationship(); please state the generic argument using an annotation, e.g. "products: Mapped[list['Product']] = relationship()"
but only if i add the navigation properties, if i use only the id to create the relation, all works
Operating System
macOS
Operating System Details
No response
SQLModel Version
0.0.16
Python Version
Python 3.12.2
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions