RE: [PEAR-DEV] DB_NestedSet not updating parent id properly

From: Date: Tue, 25 Nov 2003 23:18:42 +0000
Subject: RE: [PEAR-DEV] DB_NestedSet not updating parent id properly
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-23882@lists.php.net to get a copy of this message
> 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. > > Please let me know if you think I'm worng. 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

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