title: Sequelize: mapping between raw data and model
body: <p>I have some trouble to retrieve data from MySQL database using a raw query.
  The problem is the mapping between raw data and the instances of model defined in sequelize.
  In particular those fields that have underscored names in the database and camelcased in the model.</p>
  
  <p>I defined the Store model in this way:</p>
  
  <pre><code>sequelize.define('stores', {
      id: {
          type: DataTypes.INTEGER(11),
          allowNull: false,
          primaryKey: true,
          autoIncrement: true
      },
      ...
      postalCode: {
          type: DataTypes.STRING,
          field: 'postal_code',
      },
      ...
  }
  </code></pre>
  
  <p>and I get data from a routine in the database using this code:</p>
  
  <pre><code>sequelize.query('CALL get_stores()', {model: Stores, type: sequelize.QueryTypes.RAW}).then(function (stores) {
      console.log(stores);
  }
  </code></pre>
  
  <p>according to the documentation (<a href="http://docs.sequelizejs.com/en/latest/docs/raw-queries/" rel="nofollow">http://docs.sequelizejs.com/en/latest/docs/raw-queries/</a>) if I define the option "model" the function returns an instance of Store instead of raw data.
  But this is not true and, for all fields whose name is different in the model and in the database (see postalCode -> postal_code), the response I get returns an object with the database field names (postal_code) instead of those defined in the model (postalCode).</p>
  
  <p>I already tried using QueryTypes.SELECT instead of QueryTypes.RAW but without success.</p>
  
  <p>Please note that there is no problem when using the findAll or findOne method.</p>