Skip to content

Unmapped properties error when inheriting class #394

Description

@Morb0

Is your feature request related to a problem? Please describe.

I use MikroORM and have entity that inherits from the base entity.

class abstract BaseEntity {
  @PrimaryKey()
  id: string = v4();
}

class ItemEntity extends BaseEntity {
  @Property()
  prop: string;
}

And when i try map CreateItemDto to ItemEntity I got error about unmapped fields in base classes (like id).
Base entity not have any AutoMapping decorators.

Describe the solution you'd like

It's not really bug, I saw you answer in another issue that you can make something to handle that behavior.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions