Closed charliejharrison closed 9 months ago
Thanks for gift-wrapped bug report. I will save the wrapping.
Will look into it right away.
Fixed in preview:
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple ApiLogicServer==10.02.00
Fixed in GA: 10.02.00
If a foreign key column has the same name as the target table it causes
create
to fail.To take an example from the sample database: if
Order.CustomerID
was instead namedOrder.Customer
, thencreate
would throw an SQLAlchemy error:I think this is because when the model generation code tries to declare the relationship in the
Order
model using the target table name, but it finds a name clash with the column so appends a 1 to the name of the relationship. Something like this: