I just started using PHP namespaces. I have two classes of models in separate files
In both files, I declare the namespace first
namespace eu \ ed \ sixImport \ importViewer \ models;
first grade:
class Log extends \ Doctrine_Record
$this->hasMany('eu\ed\sixImport\importViewer\models\DataSource as DataSource', array(
'local' => 'id',
'foreign' => 'logId'));
second class:
class DataSource extends \ Doctrine_Record
$this->hasOne('eu\ed\sixImport\importViewer\models\Log as Log', array(
'local' => 'logId',
'foreign' => 'id'));
Everything works fine until I do something like this
$query = \Doctrine_Query::create()
->select('log.*')
->from('eu\ed\sixImport\importViewer\models\Log log')
->leftJoin("log.DataSource")
->orderBy("log.id DESC");
$requiredPage = (($startingRow - ($startingRow%$rowsRequired))/$rowsRequired) + 1;
$pager = new \Doctrine_Pager($query, $requiredPage, $rowsRequired);
$res = $pager->execute();
$this->logsPageCount = $pager->getNumResults();
print_r($res[0]["DataSource"]->toArray());
Than the doctrine throws an Uncaught exception "Doctrine_Exception" with the message "Could not find the eu \ ed class" in C: \ wamp \ www \ importViewer \ resources \ doctrine \ Doctrine-1.1.5 \ lib \ Doctrine \ Table.php: 293. ..
Exception , 'eu\ed'. [s] , . , ?