marshmallow-sqlalchemy
marshmallow-sqlalchemy copied to clipboard
Polymorphic Relationships only return fields defined in the abstracted class
Currently when querying and serializing against a polymorphic model, the returned attributes are only the ones defined in the parent schema. And not of any of the child Schema, which could include specific validations or other post_/pre_ steps that need to be followed. We've implemented our own implementation with our own models, which is essentially a new custom field on the abstract model that chooses it's current polymorphic target; however, this is specific to our codebase. I and generalize it out and provide an pull request.