Open
Description
Do you plan to add a generator for object_ids on the client side?
Without this function when I need an object_id of the last inserted
object I do this:
mongo:insert(Collection, Doc),
Query = [$query-Doc, $orderby-['_id'-(-1)]],
mongo:find_one(Collection, Query, ['_id'-1], ['_id'-object_id(NewRef)]),
But this is ugly...
PS I have checked that mongo:insert
allows to set _id on the client
side. It works fine with new _id but does nothing when _id is already
present in db. I think in this case it shall fail with a message or
something.
Metadata
Metadata
Assignees
Labels
No labels