HydrateOptions
HydrateOptions
Options used to control which relations of the entity get hydrated when using the EntityHydrator helper.
Signature
interface HydrateOptions<Entity extends VendureEntity> {
relations: Array<EntityRelationPaths<Entity>>;
applyProductVariantPrices?: boolean;
}
relations
property
Array<EntityRelationPaths<Entity>>Defines the relations to hydrate, using strings with dot notation to indicate nested joins. If the entity already has a particular relation available, that relation will be skipped (no extra DB join will be added).
applyProductVariantPrices
property
booleandefault:
falseIf set to true, any ProductVariants will also have their price and priceWithTax fields
applied based on the current context. If prices are not required, this can be left false which
will be slightly more efficient.