Re: DB_NestedSet not updating parent id properly

From: Date: Wed, 26 Nov 2003 01:11:25 +0000
Subject: Re: DB_NestedSet not updating parent id properly
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-23886@lists.php.net to get a copy of this message
Andy Crain wrote:
This will not change ATM cause the parent field is new and only a feature. So I can't mark it as required (old installs don't have it). If the user doesn't pass this param it should work as expected(?) or my tests are wrong. I agree that this should be solved. But it's not possible because of BC issues.
Daniel, You're right, except that when using a method like moveTree(), it's not possible to specify a node's values/payload, only node ids, and so it's not possible to exclude the parent id. Still, it's possible to correctly update the parent ids, without changing _requiredParams and causing a BC break, by testing for $this->flparams['parent'] from inside _moveCleanup() and if so then updating the parent id on each clone node. Andy
Yes - you are right. I didn't look close enough into the problem. Meanwhile I commited your patch and it looks good so far - I will add some tiny modifications and tests the next days. I will also have to find out why my testsuite didn't catch the query bugs you pointed out. You did a really great job! greetings -- Daniel Khan

« previous php.pear.dev (#23886) next »