Hi. Thank you! ... for helping. I'm fairly new to PHP and CakePHP.
For my TopicTree model (with $actsAs = array('Tree');), I have a function
in my controller which I want to simply assign a new parent_id. As I
understand it, lft and rght values should then be updated automatically,
via the TreeBehavior class' beforeSave method ... that all I need to do is
save the parent_id with a new value. So, right now, just to figure this
out, I'm manually supplying a new parent_id value.
public function reparent($id=null) {
$this->TopicTree->id = $id;
$newParentId = 51191;
$this->TopicTree->save(array('parent_id' => $newParentId));
}
CakePHP just spins its wheels; nothing happens. Why is it that this does
not work? I assume this will only work with a model that has $actsAs =
array('Tree').
Thank you, so very much, for your time and expertise!
Kevin
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php