Skip to content
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

Attribute named "ID" causes error in SQL alchemy generator #82

Open
Aran30 opened this issue May 2, 2024 · 1 comment
Open

Attribute named "ID" causes error in SQL alchemy generator #82

Aran30 opened this issue May 2, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Aran30
Copy link
Collaborator

Aran30 commented May 2, 2024

If a model contains a class with an attribute named "ID", this will generate sql alchemy code containing an error.
The problem stems from the sql alchemy generator always adding a column named "id" as a primary key, thus leading to a table having two columns named ID. The sql alchemy generator needs to do an additional check for attributes called "id".

@Aran30 Aran30 added the bug Something isn't working label May 2, 2024
@jcabot
Copy link
Collaborator

jcabot commented May 4, 2024

We should also add a configuration property to configure whether we want to generate these ID fields for every class or not (I think we already have something similar for another generator)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants