You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by fm...@apache.org on 2014/08/15 09:54:05 UTC

git commit: [OLINGO-403] fix

Repository: olingo-odata4
Updated Branches:
  refs/heads/master 0c82297cc -> 2cc02a630


[OLINGO-403] fix


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/2cc02a63
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/2cc02a63
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/2cc02a63

Branch: refs/heads/master
Commit: 2cc02a630053459869a1f9ce22552cac989c9950
Parents: 0c82297
Author: fmartelli <fa...@gmail.com>
Authored: Fri Aug 15 09:53:36 2014 +0200
Committer: fmartelli <fa...@gmail.com>
Committed: Fri Aug 15 09:53:36 2014 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java  | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2cc02a63/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java
index 942705d..5d2a1e0 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java
@@ -64,6 +64,8 @@ import org.apache.olingo.commons.core.edm.EdmTypeInfo;
 import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory;
 import org.apache.olingo.ext.proxy.AbstractService;
 import org.apache.olingo.ext.proxy.api.AbstractTerm;
+import org.apache.olingo.ext.proxy.api.ComplexCollection;
+import org.apache.olingo.ext.proxy.api.EntityCollection;
 import org.apache.olingo.ext.proxy.api.annotations.ComplexType;
 import org.apache.olingo.ext.proxy.api.annotations.CompoundKey;
 import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
@@ -266,7 +268,8 @@ public final class CoreUtils {
     final EdmTypeInfo.Builder edmTypeInfo = new EdmTypeInfo.Builder().setEdm(client.getCachedEdm());
 
     if (Collection.class.isAssignableFrom(obj.getClass())) {
-      final EdmTypeInfo type = guessPrimitiveType(client, ClassUtils.extractTypeArg(obj.getClass()));
+      final EdmTypeInfo type = guessPrimitiveType(client, ClassUtils.extractTypeArg(obj.getClass(), 
+              EntityCollection.class, ComplexCollection.class, Collection.class));
       return edmTypeInfo.setTypeExpression("Collection(" + type.getFullQualifiedName() + ")").build();
     } else if (obj instanceof Proxy) {
       final Class<?> typeRef = obj.getClass().getInterfaces()[0];