Skip to content

Support SQLAlchemy polymorphic / table inheritance #5

Description

@JoseVelazcoH

Problem

SQLAlchemy supports single-table, joined-table, and concrete-table inheritance via __mapper_args__. These patterns are very common in real applications but are currently not visualized — inheritance relationships are either ignored or shown as plain FK arrows with no distinction.

Example

class Employee(Base):
    __tablename__ = "employee"
    __mapper_args__ = {"polymorphic_on": type, "polymorphic_identity": "employee"}

class Manager(Employee):
    __tablename__ = "manager"
    __mapper_args__ = {"polymorphic_identity": "manager"}

Expected

Inheritance edges should be rendered differently from FK edges (e.g. a hollow arrow or dashed line) and labeled with the inheritance strategy (joined / single / concrete).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions