-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
type: bugA general bugA general bug
Milestone
Description
in UpdateMapperUnitTests#mapNestedIntegerFieldCorrectly, when change the last integer to grater than 10, like this:
@Test
void mapNestedIntegerFieldCorrectly() {
Update update = new Update().set("levelOne.0.1.32", "4");
Document mappedUpdate = mapper.getMappedObject(update.getUpdateObject(),
context.getPersistentEntity(EntityWithNestedMap.class));
assertThat(mappedUpdate).isEqualTo(new org.bson.Document("$set", new org.bson.Document("levelOne.0.1.32", "4")));
}
then add a 2rd field in EntityWithNestedMap, like this:
static class EntityWithNestedMap {
Map<String, Map<String, Map<String, Object>>> levelOne;
Map<String, Map<String, Map<String, Object>>> levelOne2;
}
then, the test fails.
Expected :{"$set"={"levelOne.0.1.32"="4"}}
Actual :{"$set"={"levelOne2.0"="4"}}
Metadata
Metadata
Assignees
Labels
type: bugA general bugA general bug
Type
Projects
Relationships
Development
Select code repository
Activity
christophstrobl commentedon Jun 27, 2023
@juzq thanks for reporting and the PR!
Fix QueryMapper property path resolution for nested paths containing …
Fix QueryMapper property path resolution for nested paths containing …
Fix QueryMapper property path resolution for nested paths containing …
[-]Bug: mapNestedIntegerFieldCorrectly test failed, when change the last integer to grater than 10[/-][+]Update path not correctly mapped when last segment is multi digit number[/+]Fix QueryMapper property path resolution for nested paths containing …