spring-data-mongodb
spring-data-mongodb copied to clipboard
BUG: update document was broken when key is like `child.mapmap.1012.2`
when I try to make an update { $set: { "a.b.1.2": 1 } }, the actually executed update was { $set: { "a.b.1": 1 } }.
https://github.com/hu-chia/minimal-reproduce-to-mongo-update-be-broken/blob/64fa3dc694c0db3b1813d3718194bd5be4e4ccd6/src/test/java/com/example/mongoupdate/TestMongoUpdateApplication.java#L30
minimal reproduce
https://github.com/hu-chia/minimal-reproduce-to-mongo-update-be-broken.git
Actually this is an issue about the QueryMapper how to handle the Map embedded in Map.
https://github.com/spring-projects/spring-data-mongodb/blob/cd80c8441fb216dafa2f58128e3deb4987fa409b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/convert/QueryMapper.java#L169C5-L169C5
@hu-chia thanks for reporting - we'll have a look.
Thank you for the reproducer - this one seems to be related to #4502 though slightly different.