Skip to content

delete field on subtype? #719

@meecect

Description

@meecect

I might just be blind, but is there a way when defining an inherited class, to specify that a field on the parent does not apply on the child?

In this way, if a subclass needs the majority of the fields of th parent, it can have them, but it can also eliminate a few that aren't needed.

I was thinking this may simplify my decision making process sometimes when defining a tree of inherited objects. I will sometimes regret making an object a subclass because it inherit some 'cruft' but at the same time I don't want to make a bunch of non-related 'parallel' objects and functionality.

Generally this wouldn't be a big issue, but imagine the case where you have some code that does introspection on some object and iterates across the fields that are present. In this case, it would be handy to exclude some.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions