Identifo: Users collection uses `string` as the type for `_id` attribute instead of `ObjectId`
kazemisoroush opened this issue · comments
Identifo is using Users
MongoDB collection to store the users' information. The unique _id
attribute though is using the string
data type which is not used in newer versions of MongoDB anymore. We need to store the MongoDB _id
attributes as ObjectId
instead of string
s.
Described more in this video:
https://www.loom.com/share/9d1ff53f914740b2bc318065ceb38d11
Error logs:
ADMIN_ROUTER: 2021/09/22 06:38:19 router.go:127: admin error: mongo: no documents in result (code=500)
[negroni] 2021-09-22T06:38:19Z | 500 | 972.608µs | identifo.dev.evergen.technology | GET /users/60ef8d14f9407800262dbe83
A
I believe this one is not relevant any more, we are using strings for object ID
@erudenko I still think that Identifo should be compatible with the ObjectId
BSON type as this has been a default field type for _id
attributes since earlier versions of MongoDB. This will become an unnecessary blocker and extra work for whoever wanting to migrate and start using Identifo.