User model:

```js
var User = new Schema({
  username: String,
  password: String
})

```

There is a user with the username "six".

In mongo shell this works:

```js
db.users.findOne({username:'six'})

```

With mongoose this works:

```js
User.findOne({_id: req.params.id}, function(err, user) {
  res.json(user)
})

```

But this doesn't:

```js
User.findOne({username:'six'}, function(err, user) {
  if(err) console.log(err);
  res.json(user);
});

```

There is no error returned but no user either. I am missing something and I can't see what.