i have entity
/**
* @Gedmo\Tree(type="nested")
* @ORM\Table(name="mKeyword")
* use repository for handy tree functions
* @ORM\Entity(repositoryClass="KeywordRepository")
*/
class Keyword {
/**
* @Gedmo\TreeRoot
* @ORM\Column(name="root", type="integer", nullable=true)
*/
private $root;
when i add keyword
$node = new Keyword();
$node->setTitle($data['nm']);
$parent = $this->get_node($parentId);
$node->setParent($parent);
$em = $this->getDoctrine()->getManager();
$em->persist($node);
i have in database root_id = 0
when i use
$this->db = $this->getDoctrine()->getRepository("MeaKeywordsBundle:Keyword")
$tree = $this->db->getChildren($node,true);
db is Gedmo\Tree\Entity\Repository\NestedTreeRepository
i get empty results. i see in query i have where root_id is null. But in database i have 0