Replaced the primary key for mongodb