This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-3.14.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-3.14.x by this push:
     new 762be8d  CAMEL-17506 read query with key predicate returns one entity 
(#6781)
762be8d is described below

commit 762be8d3177ddf8a9559a797a4233166366e0540
Author: damienb-opt <[email protected]>
AuthorDate: Tue Jan 18 19:17:01 2022 +0100

    CAMEL-17506 read query with key predicate returns one entity (#6781)
    
    https://issues.apache.org/jira/browse/CAMEL-17506
---
 .../org/apache/camel/component/olingo4/api/impl/Olingo4AppImpl.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/Olingo4AppImpl.java
 
b/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/Olingo4AppImpl.java
index b73f958..889f929 100644
--- 
a/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/Olingo4AppImpl.java
+++ 
b/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/Olingo4AppImpl.java
@@ -514,7 +514,7 @@ public final class Olingo4AppImpl implements Olingo4App {
                         List<UriParameter> keyPredicates = 
uriResourceEntitySet.getKeyPredicates();
                         // Check result type: single Entity or EntitySet based
                         // on key predicate detection
-                        if (keyPredicates.size() == 1) {
+                        if (keyPredicates.size() >= 1) {
                             response = (T) odataReader.readEntity(content, 
getResourceContentType(uriInfo));
                         } else {
                             response = (T) odataReader.readEntitySet(content, 
getResourceContentType(uriInfo));

Reply via email to