Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Critical
-
Resolution: Unresolved
-
Affects Version/s: 1.2.3
-
Fix Version/s: None
-
Component/s: Record
-
Labels:None
-
Environment:All
Description
When objects are hydrated with a join to a one to one relation, if the queried object is stored in the table's cache, and ATTR_HYDRATE_OVERWRITE set to false, then the one to one relation's postHydrate method will never be called.
This is due to this line.
} else if ( ! isset($prev[$parent][$relationAlias])) {
...which will always evaluate to false, and postHydrate will ever be called, as the record has been pulled from the table cache here
Test case attached.