spring-projects / spring-projects/spring-data-mongodb
Project problem with similar names
@christophstrobl is already working on this.
Since Sep 25, 2023.
- Dominant language
- Java
- Stars
- 1.7k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.