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
Activity
Ben Davies
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Attachment | DC857TestCase.php [ 10770 ] |
Ben Davies
made changes -
| 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|http://github.com/doctrine/doctrine1/blob/master/lib/Doctrine/Hydrator/Graph.php#L255]. {code} isset($prev[$parent][$relationAlias]) {code} ...will always evaluate to true (and postHydrate will ever be called, as the record has been pulled from the table cache [here|http://github.com/doctrine/doctrine1/blob/master/lib/Doctrine/Table.php#L1845] |
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|http://github.com/doctrine/doctrine1/blob/master/lib/Doctrine/Hydrator/Graph.php#L255]. {code} isset($prev[$parent][$relationAlias]) {code} ...which will always evaluate to true (and postHydrate will ever be called, as the record has been pulled from the table cache [here|http://github.com/doctrine/doctrine1/blob/master/lib/Doctrine/Table.php#L1845] |
Ben Davies
made changes -
| 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|http://github.com/doctrine/doctrine1/blob/master/lib/Doctrine/Hydrator/Graph.php#L255]. {code} isset($prev[$parent][$relationAlias]) {code} ...which will always evaluate to true (and postHydrate will ever be called, as the record has been pulled from the table cache [here|http://github.com/doctrine/doctrine1/blob/master/lib/Doctrine/Table.php#L1845] |
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|http://github.com/doctrine/doctrine1/blob/master/lib/Doctrine/Hydrator/Graph.php#L255]. {code} } else if ( ! isset($prev[$parent][$relationAlias])) { {code} ...which will always evaluate to true (and postHydrate will ever be called, as the record has been pulled from the table cache [here|http://github.com/doctrine/doctrine1/blob/master/lib/Doctrine/Table.php#L1845] |
Ben Davies
made changes -
| 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|http://github.com/doctrine/doctrine1/blob/master/lib/Doctrine/Hydrator/Graph.php#L255]. {code} } else if ( ! isset($prev[$parent][$relationAlias])) { {code} ...which will always evaluate to true (and postHydrate will ever be called, as the record has been pulled from the table cache [here|http://github.com/doctrine/doctrine1/blob/master/lib/Doctrine/Table.php#L1845] |
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|http://github.com/doctrine/doctrine1/blob/master/lib/Doctrine/Hydrator/Graph.php#L255]. {code} } else if ( ! isset($prev[$parent][$relationAlias])) { {code} ...which will always evaluate to true (and postHydrate will ever be called, as the record has been pulled from the table cache [here|http://github.com/doctrine/doctrine1/blob/master/lib/Doctrine/Hydrator/Graph.php#L155] |
Ben Davies
made changes -
| Attachment | DC857TestCase.php [ 10771 ] |
Ben Davies
made changes -
| Comment |
[ Ignore number 2 attachment. Number 1 is the right one. http://www.doctrine-project.org/jira/secure/attachment/10771/DC857TestCase.php ] |
Ben Davies
made changes -
| Attachment | DC857TestCase_Correct.php [ 10772 ] |
Ben Davies
made changes -
| Attachment | DC857TestCase.php [ 10771 ] |
Ben Davies
made changes -
| Attachment | DC857TestCase.php [ 10770 ] |
Ben Davies
made changes -
| Attachment | DC857TestCase_Correct.php [ 10772 ] |
Ben Davies
made changes -
| Attachment | DC857TestCase.php [ 10773 ] |
Ben Davies
made changes -
| 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|http://github.com/doctrine/doctrine1/blob/master/lib/Doctrine/Hydrator/Graph.php#L255]. {code} } else if ( ! isset($prev[$parent][$relationAlias])) { {code} ...which will always evaluate to true (and postHydrate will ever be called, as the record has been pulled from the table cache [here|http://github.com/doctrine/doctrine1/blob/master/lib/Doctrine/Hydrator/Graph.php#L155] |
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|http://github.com/doctrine/doctrine1/blob/master/lib/Doctrine/Hydrator/Graph.php#L255]. {code} } else if ( ! isset($prev[$parent][$relationAlias])) { {code} ...which will always evaluate to false, and postHydrate will ever be called, as the record has been pulled from the table cache [here|http://github.com/doctrine/doctrine1/blob/master/lib/Doctrine/Hydrator/Graph.php#L155] |
Ben Davies
made changes -
| Attachment | DC857.patch [ 10774 ] |