Replies: 1 comment 1 reply
-
This is not a Flask or Flask-SQLAlchemy issue, it appears to be an issue with how you've defined some of your models and relationships. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I added this naming convention in my models.py file:
And when I run
flask db migrate
I get the error:sqlalchemy.exc.InvalidRequestError: When initializing mapper mapped class User->users, expression 'user_to_service' failed to locate a name ("name 'user_to_service' is not defined"). If this is a class name, consider adding this relationship() to the <class 'app.model.user.User'> class after both dependent classes have been defined.
Here is the traceback for that error:
I'm not sure where to add the naming convention based off this. Is this a flask configuration issue?
Beta Was this translation helpful? Give feedback.
All reactions