我在 MySQL 数据库中有 2 个表,我使用的是学说 1.2 和 symfony 1.4.4
安装基础和备件
Installedbase:
ib_id
app_id
location
和
Spare:
spare_id
app_id
amount
现在我想加入表以显示备用应用程序中有多少。
例如
$q = self::createQuery("l")
->select('i.*, s.*')
->from('InstalledBase i, Spare s')
->execute();
return $q;
Doctrine 知道 app_id 字段上的表之间存在关系,但我得到了错误
500 | Internal Server Error | Doctrine_Hydrator_Exception
"Spare" with an alias of "s" in your query does not reference the parent component it is related to.
yaml: http://pastey.net/137237 我无法弄清楚这一点,有人知道什么教义在抱怨吗?