Yes, we should do these optimizations.
But aren't these optimizations dialect independent? We could apply them using Association and Tuple when the methods in BatchOperationsDelegator get called. This way, when MongoDBDialect#executeBatch(...) is called it will only have to convert them in the proper DBObjects before using the native mechanism to execute batch operations.
|