Join from the same table

I'm trying to join tables PostsCategories

What i'm trying to do is print all the categories, but if a categorie has a parent categorie, print the categorie :-)

Hope you understand!

( What i am trying so far )

        $this->modelsManager->createBuilder()
        ->columns(array('PostsCategories.name', 'parent_categorie.parent as parent'))
        ->from('PostsCategories')
        ->join('PostsCategories as parent_categorie')
        ->orderBy('PostsCategories.id DESC')
        ->limit('9')
        ->getQuery()
        ->execute();
edited Sep '15

You'll need an alias for both tables:

 $this->modelsManager->createBuilder()
        ->columns('c.name, p.name parent')
        ->from(array('c'=>'PostsCategories'))
        ->join('PostsCategories', 'c.parent_id=p.id', 'p')
        ->orderBy('c.id DESC')
        ->limit(9)
        ->getQuery()
        ->execute();

Docs: https://docs.phalconphp.com/en/latest/api/Phalcon%5Mvc%5Model%5Query%5Builder.html

I'm trying to do something like this:

Categories:

Test 1
test 2
test 3
    Test 1
    test 2
    test 4
test 4
test 5
    test 1
    test 2

How do i do this??