I'm trying to execute a query but I get an error:
Unknown table alias
The tables are setup as follows:
Template_Spot hasOne Template
Template hasMany Template_Spot
Template hasMany Location
Location hasOne Template
I'm trying to execute the following DQL:
$locationid = 1;
$spots = Doctrine_Query::create()
->select('cts.*, ct.*, uc.*')
->from('Template_Spot cts')
->innerJoin('Template ct')
->innerJoin('Location uc')
->where('uc.locationid = ?', $locationid)->execute();
Does anyone spot a problem?