marshmallow-code / marshmallow-code/marshmallow-sqlalchemy

Support for mapping model inheritance hierarchy

Open
#229 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Python
Stars
580
Forks
101
Avg merge
7h 6m
Merged PRs (30d)
3

Description

SQLAlchemy supports mapping objects using inheritance, as described [here](https://docs.sqlalchemy.org/en/13/orm/inheritance.html).

Would it be possible to make the schema include extra fields in these subclasses depending on the polymorphic identity defined on the model?

If baking such a thing into the library is not feasible, has anyone with a similar use case found a relatively clean and robust solution for this?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the SQLAlchemy inheritance documentation linked in the issue and compare its polymorphic identity model with marshmallow-sqlalchemy's schema-generation behavior. No repository files, tests, or entry points are named, and the requested behavior is not defined precisely; completion would require agreeing on the supported inheritance cases and expected subclass fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sqlalchemy
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.