The MongoDB documentation on Object IDs recommends using custom keys in a certain case:
If your document has a natural primary key that is immutable we recommend you use that in _id instead of the automatically generated ids.
How can I define a simple model object that does exactly this?
Just make sure you set
$wordbefore callingpersist().