-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQLModel codegen produces syntax errors #302
Comments
I see this as well. In order to fix broken code, I had to manually add the "metadata" variable to all association tables that didn't have primary keys - that's the bug with the double commas. After that, it works in 3.0.0rc3. |
It's not supposed to use |
I'm pretty sure that this was caused by `sqlmodel now supporting SQLAlchemy 2, and sqlacodegen wasn't ready for that. |
Thank you for the information! After that, I used an environment with SQLAlchemy < 2 and it worked!
Now the mapped_column no longer appears, as it is not yet compatible with SQLModel |
This issue still exists in rc5, which still includes mapped_column. I replaced mapped_column with sqlmodel.Column, You can work normally now. |
I am running 3.0.0rc5 with sqlalchemy 2.0.36, and it's still producing |
Yes. I haven't been able to focus on this project, and nobody has volunteered to take on the maintainership, so I don't expect progress very soon. |
@agronholm is this the ticket? |
One of them at least. I've added one more to the milestone. |
Great. Feel free to assign this one to me 😄 |
Great. I'll update in 2 or 3 weeks 🐰 |
Things to check first
I have searched the existing issues and didn't find my bug already reported there
I have checked that my bug is still present in the latest release
Sqlacodegen version
3.0.0rc3
SQLAlchemy version
2.0.23
RDBMS vendor
PostgreSQL
What happened?
The screenshot shows some of the issues.
mapped_column
.,
in line 22.Database schema for reproducing the bug
The text was updated successfully, but these errors were encountered: