Skip to content

Improve isNew() in MappingMongoEntityInformation [DATAMONGO-1386] #2300

Open
@spring-projects-issues

Description

@spring-projects-issues

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

Metadata

Metadata

Assignees

Labels

in: mappingMapping and conversion infrastructuretype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions