You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MongoJobRepositoryFactoryBean requirement for MapKeyDotReplacement should be enforced #5346
* template and a mongo transaction manager. <strong>The mongo template must be configured
* with a {@link MappingMongoConverter} having a {@code MapKeyDotReplacement} set to a non
* null value. See {@code MongoDBJobRepositoryIntegrationTests} for an example. This is
* required to support execution context keys containing dots (like "step.type" or
* "batch.version")</strong>
However, this concretely makes you create a MongoTemplate for the purpose of Spring Batch as such requirement is unusual.
I am not an expert but asked @mp911de and he's suggesting to:
not use dots in field/property names and instead do the translation differently, by e.g. creating a subdocument after a property terminates at a dot.
If that's not practical, I'd suggest to deprecate protected MongoOperations getMongoOperations() and create one using MongoDatabaseFactory (that should be provided as a new getter).
Activity
nikitanagar08 commentedon Mar 19, 2026
I would like to work on this issue. Based on the discussion, I understand this involves either:
getMongoOperations()and creating MongoTemplate usingMongoDatabaseFactoryLet me investigate the codebase and propose a solution.
Fix spring-projects#5346: Add MongoDatabaseFactory support to MongoJo…
Fix spring-projects#5346: Add MongoDatabaseFactory support to MongoJo…
Fix spring-projects#5346: Add MongoDatabaseFactory support to MongoJo…