Many to Many relation within a model #220
-
Hello! I am trying to set a ormar Many to Many relationship within itself. My use case is I want to be able to specify a list of land borders between countries and I'm struggling to find the best way to do this. My current setup currently returns a AttributeError: 'ForwardRef' object has no attribute 'get_name' on app startup (i'm using fastapi). Am I doing anything obviously wrong here? I've attempted to follow the documentation to set this up, but have failed after a few hours of troubleshooting. Thanks in advance for any help
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
You are using the ForwardRefs as type hints which won't work in older python versions. Delete your hints with forward refs and check again. |
Beta Was this translation helpful? Give feedback.
-
Fixed in 0.10.11 |
Beta Was this translation helpful? Give feedback.
Fixed in 0.10.11