Note that there are some explanatory texts on larger screens.

plurals
  1. POmany-to-many-to-many embedded form
    primarykey
    data
    text
    <p>I've three simple tables (race, judge, athlete) where columns are id and name.</p> <p>There are other two tables (race_judge and race_athlete) where I connect a race to many judge and a race to many athletes in the frontend app through embedded form as explained in <a href="http://www.symfony-project.org/more-with-symfony/1_4/en/06-Advanced-Forms" rel="nofollow">Advanced Forms</a>; these two tables have some extra fields (like judge notes on a race and athlete race number) that can be filled in in an embedded form.</p> <p>Now I want to build an embedded form for the last table "race_judge_athlete" where every single judge attending a race can give a vote to every athlete attending that race and I'd like to fill the numbers in a single form.</p> <p>How would I do that using symfony+doctrine forms?</p> <p><strong>Update</strong> : when I insert a new race (through RaceForm) judge and athletes are automatically added in race_judge and race_athlete (if selected from the choice widget) thanks to the relation in Athlete and Judge models, but this doesn't happen on race_judge_athlete.</p> <hr> <p>Here is the schema.yml:</p> <pre><code> Race: columns: name: string(255) Athlete: columns: name: string(255) relations: RaceAthlete: foreignAlias: RaceAthlete class: Race refClass: RaceAthlete local: athlete_id foreign: race_id Judge: columns: name: string(255) relations: RaceJudge: foreignAlias: RaceJudge class: Race refClass: RaceJudge local: judge_id foreign: race_id RaceJudge: columns: race_id: integer judge_id: integer judge_notes: string relations: Race: class: Race local: race_id Judge: class: Judge local: judge_id RaceAthlete: columns: race_id: integer athlete_id: integer athlete_number: integer relations: Race: class: Race local: race_id Athlete: class: Athlete local: athlete_id RaceJudgeAthlete: columns: race_id: integer judge_id: integer athlete_id: integer score: double relations: Race: class: Race local: race_id Judge: class: Judge local: judge_id Athlete: class: Athlete local: athlete_id </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload