[DC-515] HYDRATE_RECORD_HIERARCHY broken with many roots Created: 22/Feb/10 Updated: 09/Jun/10
|Reporter:||Kamil Rojewski||Assignee:||Guilherme Blanco|
When using HYDRATE_RECORD_HIERARCHY, the first top-level category is empty. Everything is assigned to the other one. Only single-root trees work properly.
|Comment by Kamil Rojewski [ 17/Mar/10 ]|
If you look at Doctrine_Collection::toHierarchy() you'll notice that there is NO reference to root_id, therefore it treats the entire collection as 1 tree (which is false). The bug is 100% repeatable. I've made a fast walkaround ba adding a multi-tree hydrator:
It should clarify the problem.
|Comment by Jonathan H. Wage [ 08/Jun/10 ]|
I think it was intended that you would only convert a single tree to a hierarchy. What would the structure of the returned data be like?
|Comment by Kamil Rojewski [ 09/Jun/10 ]|
A Doctrine_Collection with root nodes seems to work fine. It allows to traverse the tree for each root.