marshmallow-sqlalchemy icon indicating copy to clipboard operation
marshmallow-sqlalchemy copied to clipboard

Polymorphic Relationships only return fields defined in the abstracted class

Open AdrielVelazquez opened this issue 9 years ago • 0 comments

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.

AdrielVelazquez avatar Oct 16 '15 16:10 AdrielVelazquez