Simplify id assignment for MongoDB