title: Foreign key to a remote database with Propel
body: <p>I have a question about foreign keys in propel.
  I have got 2 schemas in my project that match to 2 physical databases:
  my local one  (DB One) and a
  remote DB with some read only information (DB Two)</p>
  
  <p>The point is that I need to set a foreign key from DB One to DB Two, but it doesn't work.
  Here is my schemas:</p>
  
  <p>Schema 1</p>
  
  <pre><code>&lt;database package="dbOne" defaultIdMethod="native" name="dbOne"&gt;
    &lt;table name="tableOne"&gt;
      &lt;column name="pk_tableOne" type="INTEGER" primaryKey="true" required="true" autoIncrement="true"/&gt;
      &lt;column name="column_one" type="DOUBLE" required="true"/&gt;
      &lt;foreign-key name="fk_column_one" foreignTable="tableTwo" foreignSchema = "dbTwo"&gt;
        &lt;reference local="column_one" foreign="column_two"/&gt;
      &lt;/foreign-key&gt;
        &lt;/table&gt;
  &lt;/database&gt;
  </code></pre>
  
  <p>Schema 2</p>
  
  <pre><code>&lt;database package="dbTwo" defaultIdMethod="native" name="dbTwo"&gt;
    &lt;table name="tableTwo"&gt;
      &lt;column name="column_two" type="DOUBLE" primaryKey="true" required="true"/&gt;
  &lt;/database&gt;
  </code></pre>
  
  <p>I have set both runtime/build-conf.xml with both datasources, during om/diff command i got this error:</p>
  
  <blockquote>
    <p>Execution of target "om-template" failed for the following reason: 
    "tableOne" contains a foreign key to nonexistent table "dbTwo.tableTwo"</p>
  </blockquote>
  
  <p>What am I doing wrong?</p>