christkv/node-mongodb-native — Issue #509: Look like the callback function after the insertion process is never fired
Author: muhammadghazali
Created: 2012-02-14 18:51:23+00:00
State: open

Hei,
I'm having an issue regared to the inserting process. On the documentation
[Inserting and updating](https://github.com/christkv/node-mongodb-native/blob/master/docs/insert.md), it's explained that if I set the options safe to true then the callback function is fired, but what I got is the callback functions its like never fired anyway.

Below is the code I have try before:

```javascript
collection.insert({_id:1}, {safe:true}, function(err, doc){
// no error, inserted new document, with _id=1
collection.insert({_id:1}, {safe:true}, function(err, doc){
// error occured since _id=1 already existed
console.log('I should tell you that this callback is just fired!');
});
});
```
Anyone can help me to understand the issue? Am I miss something on my code?

Thanks,
best regards.