title: Querying Polymorphic relationship in sqlalchemy
body: <p>Does anyone some idea about how to query polymorphics relationships in sqlalchemy?</p>
  
  <p>I have a Persona table with an <code>id_tipo</code> field whose values can be <code>juridica</code> or <code>fisica</code>, and that point to the <code>PersonaJuridica</code> table or <code>PersonanFisica</code> table repectively.</p>
  
  <p>I am trying to query using a <code>PersonaJuridica</code> field this way:</p>
  
  <pre><code>session.query(Persona).filter(PersonaJuridica.razon_social == "some value")
  </code></pre>
  
  <p>but it doesn't work.</p>
  
  <p>I also tried:</p>
  
  <pre><code>session.query(Persona).join(PersonaJuridica).filter(PersonaJuridica.razon_social == "some value")
  </code></pre>
  
  <p>and I get nothing.</p>
  
  <p>Hope someone can help me!</p>