title: Symfony2 mapping between 3 entities
body: <p>I have three entities : <strong>Event</strong>, <strong>Photo</strong> and <strong>User</strong>.</p>
  
  <p><img src="https://i.stack.imgur.com/5R9mE.png" alt="enter image description here"></p>
  
  <p><strong>Three main relations :</strong> </p>
  
  <ul>
  <li>An Event has 0 or more photos (blue relation, OneToMany) </li>
  <li>An Event has been created by one photo, which I call the firstPhoto (red relation,
  OneToOne)</li>
  <li>A user can create 0 or more photos (violet relation,
  OneToMany)</li>
  </ul>
  
  <p>What I want is <strong>to map the relation between an Event and the User who created it</strong>, without adding or changing my database. It means the user that created the firstPhoto of the Event.</p>
  
  <p>I'm not looking for a SQL query which I succed to do but really a mapping in my User.php Entity.</p>
  
  <p><code>$user-&gt;getEvents()</code> would give the events the user created.</p>
  
  <p>I can't success to do so... any idea ? Am I obliged to add or change something in my database ?</p>