Closed shunyeka closed 4 years ago
Hey @shunyeka,
No id
field should be inserted if you do not set it on your instance. Can you provide a more complete example so that I can try to reproduce?
On a side note, I would recommend you to modify your JSON encoder / serializer to support the ObjectId type, rather than implementing a property for every ObjectId field in every collection. See issue #31 for examples with Flask-JSON; the same principle applies whatever the library.
I'll go ahead and close this, but feel free to answer here and I'll reopen if needed. Thanks!
I am trying to convert ObjectID to string id for viewing because unable to convert ObjectID to json.
Here's what I am doing.
This is saving
id
asNone
in mongodb. What is the issue here?