php - flush() doesn't work in Doctrine 2 -


i'm new in doctrine 2. have big problem on beginning, didn't find solution in google. want keep tree in db. found nestedset plugin (https://github.com/blt04/doctrine2-nestedset). downloaded it, , tried build tree. tried way (it's same in documentation):

    $config = new \doctrineextensions\nestedset\config($entitymanager, 'src\file');     $nsm = new \doctrineextensions\nestedset\manager($config);      $mainfolder = new \src\file();     $mainfolder->setname('folder 1');     $nsm->createroot($mainfolder); 

but nothing. looked iside createroot() function, , figured out function flush() doesen't work:

    $this->getentitymanager()->flush() 

but don't know why. doesen't throw exception, , returns nothing. ideas?

that extension found has 36 commits , updated year ago. might wanna check out extension https://github.com/l3pp4rd/doctrineextensions has 1312 commits , updated 2 days ago. can use build tree: https://github.com/l3pp4rd/doctrineextensions/blob/master/doc/tree.md

the problem because don't persist() on of entities (unless extension takes care of that, extension shouldn't actually).


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -