diff --git a/connectors/translator-odata4/src/main/java/org/teiid/translator/odata4/ODataFilterVisitor.java b/connectors/translator-odata4/src/main/java/org/teiid/translator/odata4/ODataFilterVisitor.java
index 71ef0f0..6ffd5a7 100644
--- a/connectors/translator-odata4/src/main/java/org/teiid/translator/odata4/ODataFilterVisitor.java
+++ b/connectors/translator-odata4/src/main/java/org/teiid/translator/odata4/ODataFilterVisitor.java
@@ -29,6 +29,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Stack;
 
+import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
 import org.teiid.language.*;
 import org.teiid.language.SQLConstants.Tokens;
 import org.teiid.language.visitor.HierarchyVisitor;
@@ -286,8 +287,8 @@ public class ODataFilterVisitor extends HierarchyVisitor {
         try {
             String odataType = this.exprType.pop();
             this.filter.append(ODataTypeManager.convertToODataURIValue(obj.getValue(), odataType));
-        } catch (TranslatorException e) {
-            this.exceptions.add(e);
+        } catch (EdmPrimitiveTypeException e) {
+            this.exceptions.add(new TranslatorException(e));
         }
     }
 
diff --git a/connectors/translator-odata4/src/main/java/org/teiid/translator/odata4/ODataProcedureExecution.java b/connectors/translator-odata4/src/main/java/org/teiid/translator/odata4/ODataProcedureExecution.java
index 7c35c07..7228ab9 100644
--- a/connectors/translator-odata4/src/main/java/org/teiid/translator/odata4/ODataProcedureExecution.java
+++ b/connectors/translator-odata4/src/main/java/org/teiid/translator/odata4/ODataProcedureExecution.java
@@ -29,6 +29,7 @@ import java.util.Map;
 import org.apache.olingo.client.api.serialization.ODataDeserializerException;
 import org.apache.olingo.client.core.serialization.JsonDeserializer;
 import org.apache.olingo.commons.api.data.Property;
+import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
 import org.apache.olingo.commons.api.http.HttpStatusCode;
 import org.teiid.language.Argument;
 import org.teiid.language.Argument.Direction;
@@ -75,7 +76,7 @@ public class ODataProcedureExecution extends BaseQueryExecution implements Proce
         return null;
     }
     
-    private String getQueryParameters(Call obj) throws TranslatorException {
+    private String getQueryParameters(Call obj) throws EdmPrimitiveTypeException {
         StringBuilder sb = new StringBuilder();
         final List<Argument> params = obj.getArguments();
         if (params != null && params.size() != 0) {
@@ -109,9 +110,9 @@ public class ODataProcedureExecution extends BaseQueryExecution implements Proce
     
     @Override
     public void execute() throws TranslatorException {
-        String  parameters = getQueryParameters(this.command); 
         try {
-            
+        	String  parameters = getQueryParameters(this.command); 
+                
             InputStream response = null;
             Procedure procedure = this.command.getMetadataObject();
             if (isFunction(procedure)) {
@@ -125,7 +126,9 @@ public class ODataProcedureExecution extends BaseQueryExecution implements Proce
             }
         } catch (ODataDeserializerException e) {
             throw new TranslatorException(e);
-        }
+        } catch (EdmPrimitiveTypeException e) {
+        	throw new TranslatorException(e);
+		}
     }
 
     private void handleResponse(final Procedure procedure, final String baseUri, final InputStream payload)
diff --git a/olingo-common/src/main/java/org/teiid/olingo/common/ODataTypeManager.java b/olingo-common/src/main/java/org/teiid/olingo/common/ODataTypeManager.java
index a4d50da..a7145b8 100644
--- a/olingo-common/src/main/java/org/teiid/olingo/common/ODataTypeManager.java
+++ b/olingo-common/src/main/java/org/teiid/olingo/common/ODataTypeManager.java
@@ -263,24 +263,20 @@ public class ODataTypeManager {
         }
     }    
     
-    public static String convertToODataURIValue(Object val, String odataType) throws TranslatorException {
+    public static String convertToODataURIValue(Object val, String odataType) throws EdmPrimitiveTypeException {
         if (val == null) {
             return "null"; // is this correct? //$NON-NLS-1$
         }
-        try {
-            if(odataType.startsWith("Edm.")) { //$NON-NLS-1$
-                odataType = odataType.substring(4);
-            }
-            EdmPrimitiveTypeKind kind = EdmPrimitiveTypeKind.valueOf(odataType);
-            String value =  EdmPrimitiveTypeFactory.getInstance(kind).valueToString(
-                    val, true, 4000, 0, 0, true);
-            if (kind == EdmPrimitiveTypeKind.String) {
-                return EdmString.getInstance().toUriLiteral(value);
-            }
-            return value;
-        } catch (EdmPrimitiveTypeException e) {
-            throw new TranslatorException(e);
+        if(odataType.startsWith("Edm.")) { //$NON-NLS-1$
+            odataType = odataType.substring(4);
+        }
+        EdmPrimitiveTypeKind kind = EdmPrimitiveTypeKind.valueOf(odataType);
+        String value =  EdmPrimitiveTypeFactory.getInstance(kind).valueToString(
+                val, true, 4000, 0, 0, true);
+        if (kind == EdmPrimitiveTypeKind.String) {
+            return EdmString.getInstance().toUriLiteral(value);
         }
+        return value;
     }   
 
 }
diff --git a/olingo/src/main/java/org/teiid/olingo/service/EntityCollectionResponse.java b/olingo/src/main/java/org/teiid/olingo/service/EntityCollectionResponse.java
index 57ea0b3..8d1f6c0 100644
--- a/olingo/src/main/java/org/teiid/olingo/service/EntityCollectionResponse.java
+++ b/olingo/src/main/java/org/teiid/olingo/service/EntityCollectionResponse.java
@@ -47,7 +47,7 @@ import org.apache.olingo.commons.api.data.Property;
 import org.apache.olingo.commons.api.data.ValueType;
 import org.apache.olingo.commons.api.edm.EdmEntityType;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveType;
-import org.apache.olingo.commons.core.Encoder;
+import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
 import org.apache.olingo.commons.core.edm.primitivetype.EdmBinary;
 import org.apache.olingo.commons.core.edm.primitivetype.EdmDate;
 import org.apache.olingo.commons.core.edm.primitivetype.EdmDateTimeOffset;
@@ -218,7 +218,9 @@ public class EntityCollectionResponse extends EntityCollection implements QueryR
             }
         } catch (URISyntaxException e) {
             throw new SQLException(e);
-        }            
+        } catch (EdmPrimitiveTypeException e) {
+        	throw new SQLException(e);
+		}            
         
         return entity;
     }    
@@ -451,7 +453,7 @@ public class EntityCollectionResponse extends EntityCollection implements QueryR
         return this.nextToken;
     }
     
-    public static String buildId(Entity entity, EdmEntityType type) {
+    public static String buildId(Entity entity, EdmEntityType type) throws EdmPrimitiveTypeException {
         String location = type.getName() + "(";
         int i = 0;
         boolean usename = type.getKeyPredicateNames().size() > 1;
@@ -465,11 +467,7 @@ public class EntityCollectionResponse extends EntityCollection implements QueryR
             location += (key + "=");
           }
           Property p = entity.getProperty(key);
-          if (p.getType().equals("Edm.String")) {
-            location = location + "'" + Encoder.encode(p.getValue().toString()) + "'";
-          } else {
-            location = location + p.getValue().toString();
-          }
+          location += ODataTypeManager.convertToODataURIValue(p.getValue(), p.getType());
         }
         location += ")";
         return location;
diff --git a/olingo/src/test/java/org/teiid/olingo/TestODataIntegration.java b/olingo/src/test/java/org/teiid/olingo/TestODataIntegration.java
index c0e2f9a..8f0c428 100644
--- a/olingo/src/test/java/org/teiid/olingo/TestODataIntegration.java
+++ b/olingo/src/test/java/org/teiid/olingo/TestODataIntegration.java
@@ -32,6 +32,7 @@ import java.util.Arrays;
 import java.util.EnumSet;
 import java.util.List;
 import java.util.Properties;
+import java.util.TimeZone;
 
 import javax.servlet.DispatcherType;
 import javax.transaction.TransactionManager;
@@ -56,6 +57,7 @@ import org.teiid.adminapi.Admin.SchemaObjectType;
 import org.teiid.adminapi.Model;
 import org.teiid.adminapi.impl.ModelMetaData;
 import org.teiid.core.util.ObjectConverterUtil;
+import org.teiid.core.util.TimestampWithTimezone;
 import org.teiid.core.util.UnitTestUtil;
 import org.teiid.deployers.VirtualDatabaseException;
 import org.teiid.dqp.internal.datamgr.ConnectorManagerRepository.ConnectorManagerException;
@@ -76,6 +78,7 @@ import org.teiid.query.metadata.DDLStringVisitor;
 import org.teiid.query.sql.symbol.ElementSymbol;
 import org.teiid.query.sql.symbol.Expression;
 import org.teiid.query.unittest.RealMetadataFactory;
+import org.teiid.query.unittest.TimestampUtil;
 import org.teiid.runtime.EmbeddedConfiguration;
 import org.teiid.runtime.EmbeddedServer;
 import org.teiid.runtime.HardCodedExecutionFactory;
@@ -101,6 +104,7 @@ public class TestODataIntegration {
 
     @Before
     public void before() throws Exception {
+    	TimestampWithTimezone.resetCalendar(TimeZone.getTimeZone("UTC"));
         teiid = new EmbeddedServer();
         EmbeddedConfiguration config = new EmbeddedConfiguration();
         config.setTransactionManager(Mockito.mock(TransactionManager.class));
@@ -133,6 +137,7 @@ public class TestODataIntegration {
 
     @After
     public void after() throws Exception {
+    	TimestampWithTimezone.resetCalendar(null);
         server.stop();
         teiid.stop();
     }
@@ -1126,4 +1131,38 @@ public class TestODataIntegration {
             teiid.undeployVDB("northwind");
         }
     }
+    
+    @Test 
+    public void testCompositeKeyTimestamp() throws Exception {
+        HardCodedExecutionFactory hc = buildHardCodedExecutionFactory();
+        hc.addData("SELECT x.a, x.b, x.c FROM x WHERE x.a = 'a' AND x.b = {ts '2011-09-11T00:00:00'}", Arrays.asList(Arrays.asList("a", TimestampUtil.createTimestamp(111, 8, 11, 0, 0, 0, 0), 1)));
+        hc.addUpdate("INSERT INTO x (a, b) VALUES ('b', {ts '2000-02-02 22:22:22.0'})", new int[] {1});
+        
+        teiid.addTranslator("x1", hc);
+        
+        try {
+            ModelMetaData mmd = new ModelMetaData();
+            mmd.setName("m");
+            mmd.addSourceMetadata("ddl", "create foreign table x (a string, b timestamp, c integer, primary key (a, b)) options (updatable true);");
+            mmd.addSourceMapping("x1", "x1", null);
+            teiid.deployVDB("northwind", mmd);
+
+            localClient = getClient(teiid.getDriver(), "northwind", 1, new Properties());
+
+            ContentResponse response = http.newRequest(baseURL + "/northwind/m/x")
+                    .method("POST")
+                    .content(new StringContentProvider("{\"a\":\"b\", \"b\":\"2000-02-02T22:22:22Z\"}"), "application/json")
+                    .send();                        
+            assertEquals(204, response.getStatus());
+            
+            response = http.newRequest(baseURL + "/northwind/m/x(a='a',b=2011-09-11T00:00:00Z)")
+                    .method("GET")
+                    .send();
+            assertEquals(204, response.getStatus());
+
+        } finally {
+            localClient = null;
+            teiid.undeployVDB("northwind");
+        }
+    }
 }
