Ticket #786 (closed defect: fixed)
Doctrine_Hydrate_Record::getElement() clearRelated() conflicting with previous queries
| Reported by: | jwage | Owned by: | romanb |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.10.3 |
| Component: | Other | Version: | 0.10.0 |
| Severity: | Keywords: | ||
| Cc: | Has Test: | ||
| Status: | Has Patch: |
Description (last modified by jwage) (diff)
In getElement() their is a piece of code which checks for a record in the identify map then clears the related records. This causes issues when you have 2 queries where they hydrate the same data where the first query joins in some additional data, but the 2nd one doesn't. The 2nd query will clearRelated() on the referenced object from the first query, and the things you joined/hydrated in the first query are not present anymore.
Removing the clearRelated() line of code fixes the described issue above, but it also has this affect on the 0.9 tests.
It adds 4 failing tests overall. 7 new fails, but it also fixes 3 tests that fail with clearRelated()
Breaks: Doctrine_Ticket_428_TestCase : method testAggregateValueMappingSupportsLeftJoins failed on line 43 Doctrine_Ticket_428_TestCase : method testAggregateValueMappingSupportsLeftJoins failed on line 49 count aggregate value should be available Doctrine_Record_TestCase : method testSaveAssociations failed on line 768 Doctrine_Record_TestCase : method testSaveAssociations failed on line 769 Doctrine_Record_TestCase : method testSaveAssociations failed on line 794 Doctrine_Record_TestCase : method testSaveAssociations failed on line 795 Doctrine_Record_TestCase : method testSaveAssociations failed on line 802 Fixes: Doctrine_TreeStructure_TestCase : method testTreeLeafRelationships failed on line 111 Doctrine_Relation_Nest_TestCase : method testNestRelationsFetchingData failed on line 139 Doctrine_Relation_Nest_TestCase : method testNestRelationsFetchingData failed on line 144
Change History
Note: See
TracTickets for help on using
tickets.