ObjectHydrator
Full entity objects. The default hydration path.
Four hydrators live in src/Modules/EntityManager/Hydrators/:
ObjectHydrator
Full entity objects. The default hydration path.
ArrayHydrator
Raw arrays instead of entity objects.
ScalarHydrator
A single scalar value — useful for count()/aggregate-style queries.
PartialHydrator
A subset of an entity’s properties, for reporting or read-only projections.
LazyLoadingHydrator wraps ObjectHydrator with proxy injection for deferred relation loading.
ProxyGenerator generates PHP proxy classes at runtime for lazy loading. Proxies intercept property access and trigger LazyLoadingHydrator on first touch. Generated proxies are cached in the configured proxy directory.
Use PartialHydrator or ScalarHydrator when full entity hydration is unnecessary — reporting paths, aggregate output, and read-only projections all benefit. Note that normal aggregate or specific-column query-builder selects currently force raw array hydration before custom hydrators can run; see Known Limitations for the exact caveats.