LearnBoost/mongoose — Issue #670: ObjectId not being casted
Author: wavded
Created: 2012-01-05 19:10:44+00:00
State: open

See example below:

```js
Arc.count({
associations: {
$all: [
$elemMatch: {
role: role.roleType,
user: contact._id
} , {
$elemMatch:
role: 'Owner',
user: req.session.userObjId // this is a string
}]
}
}, function(err, count) {
// ...
});
```