Skip to content

Commit 75d3748

Browse files
committedDec 18, 2024·
fix(cloudant): fix structure of elemMatch query
Fix structure of elemMatch query to use: {"field":{"$elemMatch":{"$eq":value}}} Instead of wrong: {"$elemMatch":{"field":{"$eq":value}}} Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>
1 parent aadf189 commit 75d3748

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎libraries/datahandler/src/main/java/org/eclipse/sw360/datahandler/cloudantclient/DatabaseConnectorCloudant.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ public boolean contains(@NotNull String docId) {
785785
* @return New selector
786786
*/
787787
public static @NotNull Map<String, Object> elemMatch(String field, String value) {
788-
return Collections.singletonMap("$elemMatch",
789-
eq(field, value));
788+
return Collections.singletonMap(field,
789+
eq("$elemMatch", value));
790790
}
791791
}

0 commit comments

Comments
 (0)
Please sign in to comment.