Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.2.2
-
Fix Version/s: None
-
Component/s: Relations
-
Labels:None
Description
Here the definition of the Domain Model : http://pastebin.com/i80d73s8
To resume, Show is a mother class. Video, is a direct extend from Show.
ShowContainer is an abstract class that expend Show. It define an hasMany relation to Video, through CompoShowShow.
Program and Playlist are extends ShowContainer.
the following DQL Query work fine.
$query = Doctrine_Query::create ()
->from ("Model_Program program")
->leftJoin ("program.children children");
$oShow = $query->fetchOne ();
var_dump (get_class ($oShow->children[0])); //Output Model_Video
But, the following code isn't working :
$oProgram = Doctrine_Core::getTable ("Model_Program")->find (2);
$oProgram->children;//Throw Exception
//Message: Unknown record property / related component "children" on "Model_Program"
//Doctrine\Record.php(1381)
The Program#2 is in the database.
Here we are.