title: Sequelize where clause of upsert isn't respected in return query
body: <p>I am using sequelize to connect to SQL Server. Here is the basic call to upsert:</p>
  
  <pre><code>RolesPerms.upsert({
      // values
      role_id: rolePerm.role_id,
      permission_name: rolePerm.permission_name
    }, {
      // options
      where: {
        role_id: rolePerm.role_id,
        permission_name: rolePerm.permission_name
      },
      returning: true
    }).then(result =&gt; {
      console.log('dv', result[0].dataValues);
      returnArr.push(result[0].dataValues);
      return result[0].dataValues;
    })
  </code></pre>
  
  <p>Looking at the log, I see that the initial query looks like this:</p>
  
  <blockquote>
    <p>Executing (default): MERGE INTO [roles_perms] WITH(HOLDLOCK) AS
    [roles_perms_target] USING (VALUES(1, N'Role delete', '2018-10-03
    23:28:58.868 +00:00', '2018-10-03 23:28:58.868 +00:00')) AS
    [roles_perms_source]([role_i d], [permission_name], [createdAt],
    [updatedAt]) ON [roles_perms_target].[role_id] =
    [roles_perms_source].[role_id] AND
    [roles_perms_target].[permission_name] =
    [roles_perms_source].[permission_name] WHEN MATCHED THEN UPDATE SET
    [roles_perms_target].[role_id] = 1,
    [roles_perms_target].[permission_name] = N'Role delete',
    [roles_perms_target].[updatedAt] = '2018-10-03 23:28:58.868 +00:00'
    WHEN NOT MATCHED THEN INSERT ([role_id], [perm ission_name],
    [createdAt], [updatedAt]) VALUES(1, N'Role delete', '2018-10-03
    23:28:58.868 +00:00', '2018-10-03 23:28:58.868 +00:00') OUTPUT
    $action, INSERTED.*;</p>
  </blockquote>
  
  <p>This is followed by this log message:</p>
  
  <blockquote>
    <p>Executing (default): SELECT [role_id], [permission_name], [createdAt],
    [updatedAt] FROM [roles_perms] AS [roles_perms] WHERE
    [roles_perms].[role_id] = 1;</p>
  </blockquote>
  
  <p>Notice how that SELECT statement doesn't use the WHERE as defined in the upsert. Since the two fields in the upsert are the definition of the primary key, together, this results in a select statement which always just grabs the first item to match the role_id rather than the actual one just updated. In other words, the result is wrong most of the time. Fortunately, the initial query does work correctly, so the DB is OK. But I do want to report back to the calling application the correct results!</p>
  
  <p>Is this a bug or did I miss something in the docs?</p>