Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.2.0
-
Fix Version/s: 1.2.1
-
Component/s: Behaviors, Nested Set
-
Labels:None
-
Environment:Using Symfony 1.4 and MySQL
Description
I have defined this model :
Page:
options: { type: InnoDB, collate: utf8_unicode_ci, charset: utf8 }
columns:
topic: { type: string(32), notnull: true }
title: { type: string(255), notnull: true }
actAs:
NestedSet: { hasManyRoots: true, rootColumnName: topic }
And use this code (database is empty) :
<? $page = new Page; $page->topic = 'my-topic'; $page->title = 'My Title'; $page->save(); print_r( $page->topic ); // OK, here it's perfect Doctrine::getTable('Page')->getTree()->createRoot( $page ); print_r( $page->topic ); // Now topic == 1 . It's buggy ! Doctrine::getTable('Page')->getTree()->fetchTree( 'my-topic' ); // Buggy : return false ! ?>
Let me know if you need more explainations,
julien