我正在尝试执行查询,但出现错误:
未知的表别名
表设置如下:
Template_Spot hasOne Template
Template hasMany Template_Spot
Template hasMany Location
Location hasOne Template
我正在尝试执行以下 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();
有人发现问题吗?