-
Notifications
You must be signed in to change notification settings - Fork 1.1k
AddFieldsOperationBuilder.addFieldWithValueOf should treat String value as Field reference #4933
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Good catch @crmky - thanks for reporting. |
kssumin
added a commit
to kssumin/spring-data-mongodb
that referenced
this issue
May 2, 2025
This commit modifies the AddFieldsOperationBuilder to correctly treat String values as field references. When a String value is passed, it is now interpreted as a reference to another field, following MongoDB's field reference syntax. Closes spring-projects#4933 Signed-off-by: kssumin <201566@jnu.ac.kr>
christophstrobl
pushed a commit
that referenced
this issue
May 5, 2025
This commit modifies the AddFieldsOperationBuilder to correctly treat String values as field references. When a String value is passed, it is now interpreted as a reference to another field, following MongoDB's field reference syntax. Resolves: #4933 Original Pull Request: #4959 Signed-off-by: kssumin <201566@jnu.ac.kr>
christophstrobl
added a commit
that referenced
this issue
May 5, 2025
Use single field reference instead of invalid multi field. See: #4933
christophstrobl
added a commit
that referenced
this issue
May 5, 2025
Use single field reference instead of invalid multi field. See: #4933
christophstrobl
pushed a commit
that referenced
this issue
May 5, 2025
This commit modifies the AddFieldsOperationBuilder to correctly treat String values as field references. When a String value is passed, it is now interpreted as a reference to another field, following MongoDB's field reference syntax. Resolves: #4933 Original Pull Request: #4959 Signed-off-by: kssumin <201566@jnu.ac.kr>
christophstrobl
added a commit
that referenced
this issue
May 5, 2025
Use single field reference instead of invalid multi field. See: #4933
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
The current implementation treat String value as Fields instead of Field. However
org.springframework.data.mongodb.core.aggregation.DocumentEnhancingOperation.computeValue(Object, AggregationOperationContext)
doesn't support Fields but only Field, the generated BSON document is incorrect.I think change this line from:
to
should fix that issue.
The text was updated successfully, but these errors were encountered: