title: Use only one join condition in Propel
body: <p>I'm using Propel 2. I have a problem with joining conditions. Because of it I can't fetch the data using Propel API and I'm forced to use plain SQL with PDO. Here is my table structure:</p>
  
  <pre><code>&lt;table name="categories" phpName="Categories"&gt;
    &lt;column name="id"           type="integer" required="true" primaryKey="true" autoIncrement="true"/&gt;
    &lt;column name="parent_id"    type="integer" required="true" defaultValue="0"/&gt;
    &lt;column name="root_id"      type="integer" required="true" defaultValue="0"/&gt;
    &lt;column name="redirect_id"  type="integer" required="false" defaultValue="null"/&gt;
    &lt;column name="name"         type="varchar" size="255" required="true" defaultValue=""/&gt;
    &lt;column name="status"       type="char" sqlType="enum('active','deleted','disabled')" required="true" defaultValue="active"/&gt;
    &lt;foreign-key foreignTable="categories" phpName="Categories"&gt;
      &lt;reference local="parent_id" foreign="id"/&gt;
      &lt;reference local="redirect_id" foreign="id"/&gt;
    &lt;/foreign-key&gt;
    &lt;vendor type="mysql"&gt;
      &lt;parameter name="Engine" value="InnoDB"/&gt;
      &lt;parameter name="Charset" value="utf8"/&gt;
    &lt;/vendor&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>I want to use the following SQL:</p>
  
  <pre><code>SELECT    c.id, c.name
  FROM      categories c
  LEFT JOIN categories p ON c.parent_id = p.id
  WHERE     c.status = 'active' AND p.status = 'active' AND c.name LIKE '%Laptop%'
  </code></pre>
  
  <p>The Propel generated model's methods I use:</p>
  
  <pre><code>$categories = CategoriesQuery::create('c')
          -&gt;filterByName("%{$name}%")
          -&gt;filterByStatus('active')
          -&gt;useCategoriesQuery('p')
              -&gt;filterByStatus('active')
          -&gt;endUse()
          -&gt;find();
  </code></pre>
  
  <p>This way generated SQL always has two join conditions <code>LEFT JOIN categories p ON (categories.parent_id=p.id AND categories.redirect_id=p.id)</code>. I've tried using <code>join()</code>, <code>addJoin()</code> with <code>where()</code>, etc. Nothing seems to help. Obviously the problem is in my knowledge of Propel.</p>