spring-projects / spring-projects/spring-batch
MongoJobRepositoryFactoryBean requirement for MapKeyDotReplacement should be enforced
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 2.5k
- Avg merge
- 6d 53m
- Merged PRs (30d)
- 3
Description
The Javadoc of MongoJobRepositoryFactoryBean provides all the need that you need https://github.com/spring-projects/spring-batch/blob/0c91fa4daba99d81f09de405cd0463ab3d0fde16/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/MongoJobRepositoryFactoryBean.java#L33-L37
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).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the Javadoc and implementation of MongoJobRepositoryFactoryBean, especially the MapKeyDotReplacement requirement and protected getMongoOperations() mentioned in the issue. Compare the proposed MongoOperations and MongoDatabaseFactory alternatives, then establish which API and field-name behavior should change before defining completion criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, mongodb, spring
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100