Skip to main content
Version: 7.0

EntityTransformer

Converts entity instances to plain objects via toObject(), respecting populate hints, hidden fields, and serialization context.

Index

Constructors

Methods

Constructors

constructor

Methods

statictoObject

  • toObject<Entity, Ignored>(entity, ignoreFields, raw): Omit<EntityDTO<Entity>, Ignored>
  • Converts an entity to a plain object, respecting populate hints, hidden fields, and custom serializers.


    Parameters

    • entity: Entity
    • ignoreFields: Ignored[] = []
    • raw: boolean = false

    Returns Omit<EntityDTO<Entity>, Ignored>

Page Options