title: How to make join queries using Sequelize on Node.js
body: <p>I am using sequelize ORM; everything is great and clean, but I had a problem when I use it with <code>join</code> queries.
  I have two models: users and posts.</p>
  
  <pre><code>var User = db.seq.define('User',{
      username: { type: db.Sequelize.STRING},
      email: { type: db.Sequelize.STRING},
      password: { type: db.Sequelize.STRING},
      sex : { type: db.Sequelize.INTEGER},
      day_birth: { type: db.Sequelize.INTEGER},
      month_birth: { type: db.Sequelize.INTEGER},
      year_birth: { type: db.Sequelize.INTEGER}
  
  });
  
  User.sync().success(function(){
      console.log("table created")
  }).error(function(error){
      console.log(err);
  })
  
  
  var Post = db.seq.define("Post",{
      body: { type: db.Sequelize.TEXT },
      user_id: { type: db.Sequelize.INTEGER},
      likes: { type: db.Sequelize.INTEGER, defaultValue: 0 },
  
  });
  
  Post.sync().success(function(){
      console.log("table created")
  }).error(function(error){
      console.log(err);
  })
  </code></pre>
  
  <p>I want a query that respond with a post with the info of user that made it. In the raw query, I get this:</p>
  
  <pre><code>db.seq.query('SELECT * FROM posts, users WHERE posts.user_id = users.id ').success(function(rows){
              res.json(rows);
          });
  </code></pre>
  
  <p>My question is how can I change the code to use the ORM style instead of the SQL query?</p>