title: phalcon order by related model column
body: <p>I want to get records from table <code>users</code> ordered by column <code>viewed</code> from related table <code>profiles</code>. The point is that I want to do it in model-way.</p>
  
  <p>Simply I want to write query below and get models as a result.
  Query:</p>
  
  <pre><code>SELECT * FROM users JOIN profiles ON users.id = profiles.user_id ORDER BY profiles.viewed DESC
  </code></pre>