spring-projects / spring-projects/spring-data-mongodb
Improve isNew() in MappingMongoEntityInformation [DATAMONGO-1386]
@odrotbohm is already working on this.
Since Dec 30, 2020.
- Dominant language
- Java
- Stars
- 1.7k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Mark Bigler opened DATAMONGO-1386 and commented
To determine whether an entity should be treated as new, the SimpleMongoRepository.save(S entity) uses isNew(entity) from MongoEntityInformation.
In case the ID of the entity to save is assigned manually this will never return true.
Is there any reason to not have an implementation of isNew(...) in MappingMongoEntityInformation or even in PersistentEntityInformation
that includes the version property if available? (same behaviour as in MappingContextIsNewStrategyFactory.doGetIsNewStrategy())
No further details from DATAMONGO-1386
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.
Assessment
This issue has not been assessed yet.