Reputation: 95998
I have an existing MySQL database that I want to reflect using PonyORM.
I know I'm able to do that with SQLAlchemy:
engine = create_engine(...)
Base = declarative_base(metadata=MetaData(bind=engine))
...
...
class MyTable(Base):
__table__ = Table('table_name', Base.metadata, autoload=True)
Is there a similiar way to do the same with PonyORM? I couldn't find information about that in the website.
Upvotes: 9
Views: 1913
Reputation: 4849
Currently PonyORM does not have something like autoload=true
, so entities have to be declared in Python. We can add support of database reflection in the future.
Upvotes: 9