-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Labels
Description
There are cases where someone may implement js-data-mongodb
towards a pre existing Mongo database collection and some libraries (ORM's) that perform relational mapping store record _id's in the ObjectID
bson value, ie: { "_bsontype": "ObjectID", "id": { "type": "Buffer", "data": [87,...156] } }
.
When using js-data-mongodb
, it would be convenient to pass an option to translate all ObjectID fields to a string.
I would apply the logic in the method _translateIds()
on line 218 and change the name and all references to it to "_translateObjectIDs()
".
@jmdobry If you'll accept this feature, I'll put in a PR. Please let me know.