AbstractConcreteBase class provides incorrect example

Issue #2717 resolved
markhildreth created an issue

The docstring for AbstractConcreteBase shows the following example:

from sqlalchemy.ext.declarative import ConcreteBase

class Employee(AbstractConcreteBase, Base):
    pass

class Manager(Employee):
    __tablename__ = 'manager'
    employee_id = Column(Integer, primary_key=True)
    name = Column(String(50))
    manager_data = Column(String(40))
    __mapper_args__ = {
                    'polymorphic_identity':'manager',
                    'concrete':True}

This first line imports ConcreteBase, when really it should import AbstractConcreteBase

Comments (5)

  1. Log in to comment