MIFOSX-932 - chaged the query to fetch hierarchy
Merge pull request #785 from pramodn02/MIFOSX-932

MIFOSX-932 - chaged the query to fetch hierarchy