title: Multiple associations in Sails.js
body: <p>I'm currently playing around with associations in Sails.js beta (v 0.10.0-rc4).</p>
  
  <p>I'm trying to relate multiple databases into one result (using <code>sails-mysql</code>).</p>
  
  <p>The association looks like this <code>Post</code> -> <code>TagRelation</code> -> <code>Tag</code>. And I when I query the <code>Post</code> table, I want the returned object to include the associated <code>Tag</code> names.</p>
  
  <p>The models look something like this:</p>
  
  <pre><code>// Post model
  var Post = {
      title: 'string',
      body: 'string',
      tag_relations: {
          collection: 'TagRelation'
              via: 'post_id'
      }
  };
  // Tag Relation model
  var TagRelation = {
      post_id: {
          model: 'Post'
      },
      tag_id: {
          model: 'Tag'
      }
  };
  // Tag model
  var Tag = {
      name: 'string',
      tag_relations: {
          collection: 'Tag',
          via: 'tag_id'
      }
  };
  </code></pre>
  
  <p>Now, once I go to <code>http://localhost:1337/post/1</code> I'll get a JSON object with a <code>tag_relations</code> key, containing an array of <code>TagRelation</code> objects, but is there a way to get a list of actual <code>Tag</code> objects they are referring to instead? Or is there a better way to do this?</p>