Custom format for MongoDB primary keys