Skip to content

Nested data structure update (numeric keys) #3652

Closed
@MarcoFlo

Description

@MarcoFlo

When I try to update a nested data structure with numeric keys, the operation doesn't turn out as expected and the nested structure is not preserved.

An example:
new org.springframework.data.mongodb.core.query.Update().set("node.1.59.21", dataEntity)
insert_err

This behaviour was not present in spring-boot-starter-data-mongodb/2.3.9.RELEASE, but from that version onwards yes (2.3.10.RELEASE and 2.4.5 tested)

The java driver (4.0.5, 4.0.6, 4.1.2) itself has been excluded, due to the fact
com.mongodb.client.model.Updates.set("node.1.59.21", dataEntity.toDocument())
works as expected and it's my current workaround.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: feedback-reminderWe've sent a reminder that we need additional information before we can continuestatus: waiting-for-feedbackWe need additional information before we can continue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions