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

git commit: [OLINGO-129] Changed typed to normal Query

Repository: olingo-odata2
Updated Branches:
  refs/heads/Olingo-129_PocJpaDataStore 5cb6e15fc -> 704016426


[OLINGO-129] Changed typed to normal Query


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

Branch: refs/heads/Olingo-129_PocJpaDataStore
Commit: 7040164265c678af0a93b437a1ecadbe098e87e0
Parents: 5cb6e15
Author: Michael Bolz <mi...@sap.com>
Authored: Mon May 19 15:27:54 2014 +0200
Committer: Michael Bolz <mi...@sap.com>
Committed: Mon May 19 15:27:54 2014 +0200

----------------------------------------------------------------------
 .../processor/core/datasource/JpaAnnotationDataStore.java        | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/70401642/odata2-annotation-processor/annotation-processor-core/src/main/java/org/apache/olingo/odata2/annotation/processor/core/datasource/JpaAnnotationDataStore.java
----------------------------------------------------------------------
diff --git a/odata2-annotation-processor/annotation-processor-core/src/main/java/org/apache/olingo/odata2/annotation/processor/core/datasource/JpaAnnotationDataStore.java b/odata2-annotation-processor/annotation-processor-core/src/main/java/org/apache/olingo/odata2/annotation/processor/core/datasource/JpaAnnotationDataStore.java
index 8113c33..17e7755 100644
--- a/odata2-annotation-processor/annotation-processor-core/src/main/java/org/apache/olingo/odata2/annotation/processor/core/datasource/JpaAnnotationDataStore.java
+++ b/odata2-annotation-processor/annotation-processor-core/src/main/java/org/apache/olingo/odata2/annotation/processor/core/datasource/JpaAnnotationDataStore.java
@@ -20,6 +20,7 @@ import javax.persistence.EntityManager;
 import javax.persistence.EntityManagerFactory;
 import javax.persistence.EntityTransaction;
 import javax.persistence.Persistence;
+import javax.persistence.Query;
 import javax.persistence.TypedQuery;
 import org.apache.olingo.odata2.annotation.processor.core.util.AnnotationHelper;
 import org.apache.olingo.odata2.annotation.processor.core.util.AnnotationRuntimeException;
@@ -122,8 +123,7 @@ public class JpaAnnotationDataStore<T> implements DataStore<T> {
 
   @Override
   public Collection<T> read() {
-    TypedQuery<T> query = entityManager.createQuery(
-            "select t from " + dataTypeClass.getSimpleName() + " t", dataTypeClass);
+    Query query = entityManager.createQuery("SELECT t FROM " + dataTypeClass.getSimpleName() + " t");
     return query.getResultList();
   }