Update of MongoDBConnector avoid a duplicate key error when creating new objects