openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fayw...@apache.org
Subject svn commit: r811767 - in /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/cache: TestQueryTimestampEviction.java Usage.java
Date Sun, 06 Sep 2009 06:05:39 GMT
Author: faywang
Date: Sun Sep  6 06:05:39 2009
New Revision: 811767

URL: http://svn.apache.org/viewvc?rev=811767&view=rev
Log:
fix test case problem for MySQL

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/cache/TestQueryTimestampEviction.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/cache/Usage.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/cache/TestQueryTimestampEviction.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/cache/TestQueryTimestampEviction.java?rev=811767&r1=811766&r2=811767&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/cache/TestQueryTimestampEviction.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/cache/TestQueryTimestampEviction.java
Sun Sep  6 06:05:39 2009
@@ -87,10 +87,10 @@
         EntityManager em = emf.createEntityManager();
         em.getTransaction().begin();
 
-        String insert1 = "insert into part(partno,parttype,name,cost,mass)" +
+        String insert1 = "insert into Part(partno,parttype,name,cost,mass)" +
             " values(13,'PartBase','breakes',1000.0,100.0)";
         em.createNativeQuery(insert1).executeUpdate();
-        String insert2 = "insert into supplier_part(suppliers_sid," +
+        String insert2 = "insert into Supplier_Part(suppliers_sid," +
             "supplies_partno) values(1,13)";
         em.createNativeQuery(insert2).executeUpdate();
 
@@ -100,7 +100,7 @@
         em = emf.createEntityManager();
         em.getTransaction().begin();
 
-        String sql = "select partno from part where cost > 120 ";
+        String sql = "select partno from Part where cost > 120 ";
         Query nativeq = em.createNativeQuery(sql);
         int nativelistSize = nativeq.getResultList().size();
 
@@ -203,7 +203,7 @@
         EntityManager em = emf.createEntityManager();
         em.getTransaction().begin();
 
-        em.createNativeQuery("delete from supplier_part").executeUpdate();
+        em.createNativeQuery("delete from Supplier_Part").executeUpdate();
         em.createQuery("delete from PartBase s").executeUpdate();
         em.createQuery("delete from Supplier s").executeUpdate();
         em.createQuery("delete from Usage u").executeUpdate();

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/cache/Usage.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/cache/Usage.java?rev=811767&r1=811766&r2=811767&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/cache/Usage.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/cache/Usage.java
Sun Sep  6 06:05:39 2009
@@ -24,7 +24,7 @@
 
 @Entity
 @DataCache(timeout=100000)
-
+@Table(name="Usage1")
 public class Usage {
     @Id  
     @GeneratedValue(strategy=GenerationType.IDENTITY)



Mime
View raw message