blt04 / doctrine2-nestedset

A NestedSet extension for Doctrine2
GNU Lesser General Public License v2.1
127 stars 49 forks source link

I can't create root node #26

Open SimonIsMe opened 11 years ago

SimonIsMe commented 11 years ago

Hey, I want to build a simple web file manager. Right now I got a code looking like this:

    $config = new \DoctrineExtensions\NestedSet\Config($entityManager, 'src\File');
    $nsm = new \DoctrineExtensions\NestedSet\Manager($config);

    $file = new \src\File();
    $file->setName('Plik');

    var_dump($nsm->createRoot($file));

But it doesn't work. var_dump() in last line returns me nothing, even "null"