title: Having trouble transcribing mySQL query in peewee
body: <p>I have a query in mySQL that produces desired output when entered into the mySQL terminal, however, I'm having trouble trying to write the same query in the Peewee ORM.</p>
  <p>Here is the mySQL query:</p>
  <pre><code>select t.PATH, s.PATH from media_data as t 
  left outer join media_data as s on 
  s.SHOW = t.SHOW and s.EPISODE = t.EPISODE and s.SHOT = t.SHOT and s.FRAME = t.FRAME and t.LABEL_TYPE = 'target' 
  where s.LABEL_TYPE = 'source' and s.SHOW = 'doc_d' and s.EPISODE = '102'        
  union 
  select t.PATH, s.PATH from media_data as t 
  right outer join media_data as s on
  s.SHOW = t.SHOW and s.EPISODE = t.EPISODE and s.SHOT = t.SHOT and s.FRAME = t.FRAME and t.LABEL_TYPE = 'target' 
  where s.LABEL_TYPE = 'source' and s.SHOW = 'doc_d' and s.EPISODE = '102';
   
  </code></pre>
  <p>And here is my attempt at the corresponding peewee query</p>
  <pre><code>s = media_data.alias()
  t = media_data.alias()
  
  predicate = (s.SHOW == t.SHOW and s.EPISODE == t.EPISODE and s.SHOT == t.SHOT 
               and s.FRAME == t.FRAME and t.LABEL_TYPE == 'target')
  
  query = media_data.select(s.PATH, t.PATH).join(t, join_type=JOIN.FULL_OUTER, on=predicate).where(s.LABEL_TYPE == 'source' and s.SHOW == show and s.EPISODE == episode)
  
  </code></pre>
  <p>When I try to run python, it tells me there's a problem with 'JOIN.FULL_OUTER' even though it is used exactly as defined in the syntax.</p>