views:

132

answers:

0

Hello,

in a table "list" i save the id of another table, list also act as a nestedset. In a form i can add a child to a root. I set the value of the root as hidden field in the form.

So in doSave when he detected a value in the hidden field, he do this,

$parent = Doctrine::getTable('list')->findOneById($this->getValue('parent_id'));
$this->getObject()->getNode()->insertAsLastChildOf($parent);

But when he do so, doctrine replace the correct id with the id of the parent node. I have checked this million of times, when i save without "insertAsLastChildOf" he save the id of the child correctly, and also the parent_id and the child_id are correctry loaded, and moveAsLastChildOf do nothing else

This driving me really cracy...