1

I have a table that acts as a nested set. The problem is, that the table have fields 'short_name' and 'long_name' and in different places i have to order the results accordingly.

I'm using Doctrine's "HYDRATE_RECORD_HIERARCHY" hydration mode when querying the tree. The problem is: as far as i can tell this hydration mode is limited in terms that the query have to contain the orderBy clause "ORDER BY lft ASC"

Is there any way to get a sorted result set or do i have to apply some type of sorting after the query has been returned?

Since i'm getting back a Doctrine Collection (i'd really like to stay away from the array representation) it's not that trivial to sort it afterwards.

sanya
  • 860
  • 1
  • 8
  • 20

0 Answers0