Skip to content

Project problem with similar names #4509

Open
@OddyUlrich

Description

@OddyUlrich

Good afternoon, I am currently doing a project where I am using an "aggregation" to do a $lookup, a $unwind and finishing with a $project. To simplify the data and since I don't need all the information that $lookup brings me I use the project to get, , among other things, the id and some fields of the document to which I do $lookup.

The problem comes when I go to see the result of the query and the instance of the class where the data is, doesn't have the correct data.
This is because if the name of the field in the $project has one similar or equal to the one in the value field, this value is not copied and I don't really understand why...

I attach a demo where in the file "TfgBackendApplication.java" you can use debugger to see the fields of an example where one field is wrong and the other is right, although they are also printed on the screen.

I'm sorry if this is a stupid question, but it's really taken me a while to realise this...
demo.zip

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions