Skip to content

Fix/sql generation issue 489#491

Merged
ArmenSl merged 4 commits intodevelopmentfrom
fix/sql_generation_issue_489
Apr 13, 2026
Merged

Fix/sql generation issue 489#491
ArmenSl merged 4 commits intodevelopmentfrom
fix/sql_generation_issue_489

Conversation

@ivan-alfonso
Copy link
Copy Markdown
Collaborator

This PR fixes issue #489.
The problem was caused by the use of SQLAlchemy reserved keywords as class names.
To address this, aliases are now used in the generated code to allow names in the class diagram like List or Table for classes.

The error message has been improved. If the user defines a class using a reserved keyword and runs the generator, an error will be raised indicating which class name is causing the issue.

fixed #489

@ivan-alfonso ivan-alfonso requested a review from ArmenSl April 10, 2026 15:30
ivan-alfonso and others added 2 commits April 10, 2026 17:41
Add lowercase 'enum' to RESERVED_NAMES since the generated template
imports `import enum` — a class named 'enum' would shadow it.
Fix missing newline at end of test file.
@ArmenSl ArmenSl merged commit 524c948 into development Apr 13, 2026
4 checks passed
@ArmenSl ArmenSl deleted the fix/sql_generation_issue_489 branch April 13, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants