Thefollowingexamplerepresentsabithardercasewhereweselectallentitiesandtheirassociatedphonenumbersusingaleftjoin.Againwewrapallthecolumnsincurlybracketsbutwealsospecifywhattablesassociatetowhichcomponents.Firstwespecifythattableentitymapstorecordclass'Entity'ThenwespecifythattablephonenumbermapstoEntity.Phonenumber(meaningphonenumberassociatedwithanentity)<codetype="php">$query=newDoctrine_RawSql($conn);$query->parseQuery("SELECT {entity.*}, {phonenumber.*} FROM entity LEFT JOIN phonenumber ON phonenumber.entity_id = entity.id");$query->addComponent("entity","Entity");$query->addComponent("phonenumber","Entity.Phonenumber");$entities=$query->execute();</code>