Skip to content

SpringDataMongodbQuery and SpringDataMongodbSerializer apply mapping twice #4709

Closed
@bro0k

Description

@bro0k
# Entity class example
@Document(collection = "record")
public class Record {
    @Id
    private String id;

    @Field("embedded_object")
    private EmbeddedObject embeddedObject;
}

@Document(collection = "embedded_object")
public class EmbeddedObject {
    @Id
    private String id;
}

# Query code example
recordRepository.findAll(QRecord.record.embeddedObject.id.eq("64268a7b17ac6a00018bf312"), PageRequest.of(0,1))

# Expected correct result
find using query: { "embedded_object._id" : { "$oid" : "64268a6117ac6a00018bf30f"}} fields: Document{{}} 

# Actual incorrect result
find using query: { "embedded_object._id" : "64268a6117ac6a00018bf30f"} fields: Document{{}} 

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions