agronholm / sqlacodegen

Automatic model code generator for SQLAlchemy
Other
1.86k stars 240 forks source link

Fix Column and metadata in SQLModel Generator #306

Open THUzxj opened 10 months ago

THUzxj commented 10 months ago

I encountered a similar problem with #302 and I tried to fix it, including

Maybe we can also refactor generate_models to decouple the function of getting models and collecting imports.

It is probably just a temporary solution to the issue. Thus it's up to you whether to merge. Thanks.

coveralls commented 10 months ago

Coverage Status

coverage: 99.035%. remained the same when pulling d1fec1585380b1d2a5a4f87027399c4734091bdf on THUzxj:master into 6b8bc90c68c3fe162c78edb5395474c7166b1ede on agronholm:master.

agronholm commented 10 months ago

I am working on a proper fix for the problem. Most of the time, Column should not be used by the generator.