I'm not an expert, but it seems risky to trust MongoDB for that. Isn't it the wrong tool for that space?
You can enable that behavior for MongoDB, but then you're just getting ordinary SQL-style behavior, so why were you using MongoDB in the first place?