Detect the ORM correctly for hierarchies.
Merge pull request #274 from avbrychak/patch-2

Detect the ORM correctly for hierarchies.