Ticket #1219 (closed defect: fixed)
NestedSet import data from yaml, root_id is not set correctly
Description (last modified by lucassus) (diff)
My model is:
class Store_Category extends Doctrine_Record
{
public function setTableDefinition()
{
$this->setTableName('store.categories');
$this->hasColumn('name', 'string', 255, array(
'notblank' => true
));
$this->hasColumn('description', 'string');
}
public function setUp()
{
$this->actAs('NestedSet', array('hasManyRoots' => true,
'rootColumnName' => 'root_id'));
}
}
My fixtures:
Store_Category:
Store_Category_Decorations:
name: Dekoracje na gwiazdkę
children:
Store_Category_Decorations_1:
name: Ascetyczne mobile
Store_Category_Decorations_2:
name: Na choinkę, na prezent, na stół...
Store_Category_Office:
name: Biuro
children:
Store_Category_Office_Equipment:
name: Wyposażenie
children:
Store_Category_Office_Equipment_1:
name: Akcesoria biurowe Blomus
Store_Category_Office_Equipment_2:
name: Akcesoria biurowe Zack
Store_Category_Office_Equipment_3:
name: Myszki komputerowe
After import fixtures to database root_id for all records is set to '1'. I'm using postres and phpDoctrine v0.11
Change History
Note: See
TracTickets for help on using
tickets.