abgerufen werden kann Ich habe eine einfache Symfony-Controller geschrieben, wo ich zwei Tabelle als specialistarea und Arzt haben.Wie Daten aus mehreren Tabellen mit Join und Where-Klausel
dies die grundlegende Struktur der Tabelle ist
specialtyarea
-----------------
id | name |
-----------------
1 | dentist |
2 | physician |
Physician Tabelle specialtyarea
wie gezeigt verwandt ist:
Physician
--------------------
id | name | specfk |
--------------------
1 | John | 1 |
2 | Doe | 2 |
3 | Ann | 2 |
alle Arzt Ich versuche Bereich 2
ist, wo Spezialität zu holenDies ist mein Codeschnipsel
public function getAllPhysicianAction($specId)
{
$id = $this->getDoctrine()->getRepository('Bundle:SpecArea')
->find($specId); //assuming that this returns all the id from the specialty table
$allPhysician = $id->getPhysician()->... //kind of lost here
}
Wie kann ich alle Datensätze aus der Arzttabelle mit der Speziellen ID abrufen?
keine Route gefunden Verwendung für getallphysician – parker
@parker Hast du eine Route für getallphysician erstellt? Wenn nicht, dann poste bitte deine Routen-Konfiguration. – Gerjan
Wo finde ich die Route-Konfigurationsdatei. bin neu zu symfony – parker