$query = $em ->createQuery( 'SELECT ga FROM AppBundle:GoodsAndAttribute ga WHERE ga.id = 1');
在orm中如何關聯多個表,實現相應資訊的查詢?例如
$query = $em ->createQuery( 'SELECT ga, g, a FROM ApplicationSonataMallBundle:GoodsAndAttribute ga JOIN ga.goods g JOIN ga.attribute a WHERE ga.id = 1');
$query = $em ->createQuery( 'SELECT ga FROM AppBundle:GoodsAndAttribute ga WHERE ga.id = 1');
在orm中如何關聯多個表,實現相應資訊的查詢?例如
$query = $em ->createQuery( 'SELECT ga, g, a FROM ApplicationSonataMallBundle:GoodsAndAttribute ga JOIN ga.goods g JOIN ga.attribute a WHERE ga.id = 1');