there is a bug in the plugin see
http://trac.symfony-project.com/trac/ticket/2129
after the fix you can use for fetch a tree in a table with multiple
trees:
$this->tree = $treeObject->fetchTree(array('root_id' => $id));
greetings
Gordon
On 21 Aug., 13:41, gimler <[EMAIL PROTECTED]> wrote:
> hello,
>
> i have a problem with the tree in doctrine i can`t add a where
> statement ;( i get an error
>
> error:
> SQLSTATE[HY093]: Invalid parameter number: number of bound variables
> does not match number of tokens
>
> schema:
> tblDocumentElement:
> tableName: tblDocumentElement
> options:
> hasManyRoots: true
> rootColumnName: document_id
> treeImpl: NestedSet
> columns:
> document_id:
> type: integer
> size: 4
> foreignClass: tblDocument
> foreignName: document
> localName: elements
> cascadeDelete: true
> content:
> type: string
>
> code:
> // tree object
> $treeObject = Doctrine_Manager::getInstance()-
>
> >getTable('tblDocumentElement')->getTree();
>
> // tree query
> $query = Doctrine_Query::create()->from('tblDocumentElement
> t')->where('t.document_id = ?', $this->doc_data['id']);
>
> $treeObject->setBaseQuery($query);
>
> // fetch tree
> $this->tree = $treeObject->fetchTree();
>
> thanks. greetings
> Gordon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---