Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.1

Bug #18448 fail to submit ID with createSubNode()
Submitted: 2011-04-15 13:19 UTC
From: luti Assigned:
Status: Open Package: DB_NestedSet (version 1.4.1)
PHP Version: 5.3.5 OS: Windows Server 2003
Roadmaps: (Not assigned)    
Subscription  


 [2011-04-15 13:19 UTC] luti (Tillmann Lübker)
Description: ------------ When inserting a subnode using createSubNode(), I'd like to explicitly state the ID of the node to be created using this->$params. However, the id provided is not considered in the INSERT statement. Instead auto_increment is used as ID. There must be sth. wrong between line 1137 and 1160 in the NestedSet.php file. Test script: --------------- $params = array( 'my_id' => 'id', #... 'my_name' => 'name' ); #... echo 'NODE-ID: '.$nestedSet->createSubNode($node, array('my_name' => 'sth', 'my_id' => 9999 )); Expected result: ---------------- NODE-ID: 9999 Actual result: -------------- NODE-ID: 16 #i.e. the auto-incremented ID

Comments