title: Sequelize syntax for where search
body: <p><strong>Hello everyone !</strong> Small stupid question, after having scoured the web of course.</p>
  <p>With sequelize, I want to add a second argument to where. That is to say that currently I am only looking for the email. I would like to add the username to it. Here is my basic code snippet:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>exports.signup = (req, res) =&gt; {
  models
      .findOne({
        attributes: ['email'],
        where: {
          email:  Buffer.from(req.body.email).toString("hex")
        }
      })
   }</code></pre>
  </div>
  </div>
  </p>
  <p>and I would like this sort of thing:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>models
      .findOne({
        attributes: ['email'] ['username'],
        where: {
        username: username,
          email:  Buffer.from(req.body.email).toString("hex")
        }
      })</code></pre>
  </div>
  </div>
  </p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>.findOne({
    attributes: ['email', 'username' ], // --&gt; instead of ['email'] ['username']
    where: {
      username: req.body.username, // -&gt; If you are getting username from the request body
      email:  Buffer.from(req.body.email).toString("hex")
    }
  })
  
      .then(
  
        ((userFound) =&gt; {
  
            if (!userFound ) {
  
              bcrypt.hash(password, 10, function (err, bcryptPassword) {
  
                const newUser = models
                  .create({
                    username: username,
                    email: Buffer.from(req.body.email).toString("hex"),
                    password: bcryptPassword,
                    bio: bio,
                    admin: false
                  })
  
                  .then((newUser) =&gt; {
                    res.status(201).json({
                      userId: newUser.id,
                      message: 'Merci, votre inscription est bien pris en compte !'
                    })
                  })
                  .catch((err) =&gt; {
                    res.status(500).json({
                      error: "Impossible d'ajouter un utilisateur",
                    })
                  })
  
              })
  
            } else {
              return res.status(409).json({
                error: 'Ce compte existe déjà ',
              })
            }
  
        })
      )
  
  }</code></pre>
  </div>
  </div>
  </p>
  <p>I have tried several syntax, and also with the findAll method but I must go wrong.</p>
  <p>Thanks in advance.</p>