flask-sqlalchemy
flask-sqlalchemy copied to clipboard
Incorrect(?) example in documentation
Environment:
- Python version: 3.x
- Flask-SQLAlchemy version: 3.1.x
- SQLAlchemy version: N/A I found a possibly incorrect example in the Reflecting Tables section of docs/models.rst There is a class definistion:
class User:
__table__ = db.metadatas["auth"].tables["user"]
As far as I know it doesn't work, because the parent class is missing from it. The correct definition would be
class User(Base):
__table__ = db.metadatas["auth"].tables["user"]
Of course, I may have misunderstood something.