title: How to write UNION in Doctrine 2.0
body: <p>How to write this SQL query in Doctrine 2.0 (and fetch results)?</p>
  
  <pre><code>(SELECT 'group' AS type, 
      CONCAT(u.firstname, " ", u.surname) as fullname, 
      g.name AS subject,
      user_id, 
      who_id, 
      group_id AS subject_id,
      created 
    FROM group_notification 
    JOIN users u ON(who_id = u.id) 
    JOIN groups g ON(group_id = g.id)
  )
  
     UNION 
  
  (SELECT 'event' AS type, 
      CONCAT(u.firstname, " ", u.surname) as fullname, 
      e.name AS subject, 
      user_id, 
      who_id, 
      event_id AS subject_id, 
      created 
    FROM event_notification 
    JOIN users u ON(who_id = u.id) 
    JOIN events e ON(event_id = e.id)
  )
     ORDER BY created
  </code></pre>