TinyMongo should enforce using ObjectId, just like MongoDB does.
The bson ObjectId can't be used directly, because it doesn't accept TinyDB ids (they are too short). So either make the TinyDB id the right size, or implement own ObjectId:
class ObjectId:
def __new__(cls, *args, **kwargs):
return str(args[0])
TinyMongo should enforce using ObjectId, just like MongoDB does.
The bson ObjectId can't be used directly, because it doesn't accept TinyDB ids (they are too short). So either make the TinyDB id the right size, or implement own ObjectId: