ZF2 discussion module, tree traversal on sql server side