BESSER-PEARL / BESSER

A Python-based low-modeling low-code platform by BESSER
https://besser.readthedocs.io/en/latest/
MIT License
42 stars 9 forks source link

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

Open Aran30 opened 2 months ago

Aran30 commented 2 months ago

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".

jcabot commented 2 months ago

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)