I am developing an API using Codeigniter and MongoDB. In this system I am saving the full name and _ID of users that the selected user is following.
What is best to
When you use ObjectId, it generates _id as a unique value in all your computers. So if you use Sharding, you will not worry about you _id conflicts. See how ObjectId generates in specification But if you use string, you should generate it carefully.
ObjectId
_id