You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HYDRATE_SINGLE_SCALAR: Kinda like the HYDRATE_SCALAR, but only one key inside the array will be supported
array<array{id: int}>
is untouched, but
array<array{user: User}>
would be transformed to
array<array{u_username: ...}> // Only if there is only one property inside the object
HYDRATE_SCALAR_COLUMN: Kinda like the HYDRATE_SINGLE_SCALAR, but the single-array element is replaced by the element.
array<array{id: int}>
is changed to
array<int>
HYDRATE_SIMPLEOBJECT: I don't really know this one.
I would say that good steps would be
Infer the result when there is no object inside the result (for most of the hydration mode it's like HYDRATE_OBJECT)
Infer the result when there is an object inside the result by replacing to array<string, mixed>
The text was updated successfully, but these errors were encountered:
VincentLanglet
changed the title
Add support for other QueryResultDynamicReturnTypeExtension
Add support for other hydration mode in QueryResultDynamicReturnTypeExtension
Dec 26, 2022
I think we can "easily" improve the QueryResultDynamicReturnTypeExtension to supports more than
HYDRATE_OBJECT
.Click here to see the different hydration modes
HYDRATE_OBJECT: Default behavior, return the result without modifications.
HYDRATE_ARRAY: Every object are transformed to an array, so
is untouched, but
would be transformed to
is untouched, but
would be transformed to
is untouched, but
would be transformed to
is changed to
I would say that good steps would be
object
inside the result (for most of the hydration mode it's like HYDRATE_OBJECT)object
inside the result by replacing toarray<string, mixed>
The text was updated successfully, but these errors were encountered: