openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fa...@apache.org
Subject svn commit: r899851 - in /openjpa/trunk/openjpa-persistence-jdbc/src/test: java/org/apache/openjpa/persistence/xmlmapping/entities/ resources/org/apache/openjpa/persistence/xmlmapping/query/
Date Sat, 16 Jan 2010 00:26:51 GMT
Author: fancy
Date: Sat Jan 16 00:26:51 2010
New Revision: 899851

URL: http://svn.apache.org/viewvc?rev=899851&view=rev
Log:
OPENJPA-1461: Incorrect Oracle CREATE TABLE DDL for XML column
Changed mapping table name from "TORDER" to "TORDERXML" in test case.

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xmlmapping/entities/Order.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.db2
    openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.mysql
    openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.oracle
    openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.postgres
    openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.sqlserver

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xmlmapping/entities/Order.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xmlmapping/entities/Order.java?rev=899851&r1=899850&r2=899851&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xmlmapping/entities/Order.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xmlmapping/entities/Order.java
Sat Jan 16 00:26:51 2010
@@ -26,7 +26,7 @@
 import org.apache.openjpa.persistence.jdbc.Strategy;
 
 @Entity
-@Table(name="TORDER")
+@Table(name="TORDERXML")
 public class Order {
     @Id 
     int oid;

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.db2
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.db2?rev=899851&r1=899850&r2=899851&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.db2
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.db2
Sat Jan 16 00:26:51 2010
@@ -15,24 +15,24 @@
 -- specific language governing permissions and limitations
 -- under the License.    
 
-DELETE FROM TORDER t0
+DELETE FROM TORDERXML t0
 SELECT t0.countryCode, t0.id, t0.version, t0.city, t0.state, t0.street, t0.zip, t0.name FROM
TCUSTOMER t0 
 DELETE FROM TCUSTOMER WHERE countryCode = ? AND id = ? AND version = ?
 DELETE FROM TCUSTOMER WHERE countryCode = ? AND id = ? AND version = ?
-INSERT INTO TORDER (oid, amount, delivered, shipAddress, version, customer_countryCode, customer_id)
VALUES (?, ?, ?, ?, ?, ?, ?)
+INSERT INTO TORDERXML (oid, amount, delivered, shipAddress, version, customer_countryCode,
customer_id) VALUES (?, ?, ?, ?, ?, ?, ?)
 INSERT INTO TCUSTOMER (countryCode, id, creditRating, name, version, city, state, street,
zip) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
 INSERT INTO TCUSTOMER (countryCode, id, creditRating, name, version, city, state, street,
zip) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
-INSERT INTO TORDER (oid, amount, delivered, shipAddress, version, customer_countryCode, customer_id)
VALUES (?, ?, ?, ?, ?, ?, ?)
-SELECT t0.shipAddress FROM TORDER t0 
-SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDER t0 
+INSERT INTO TORDERXML (oid, amount, delivered, shipAddress, version, customer_countryCode,
customer_id) VALUES (?, ?, ?, ?, ?, ?, ?)
+SELECT t0.shipAddress FROM TORDERXML t0 
+SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDERXML t0 
 SELECT t0.version, t0.countryCode, t0.id, t0.city, t0.state, t0.street, t0.zip, t0.name FROM
TCUSTOMER t0 WHERE t0.countryCode = ? AND t0.id = ?  optimize for 1 row
-SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDER t0 JOIN TORDER t1 ON (1 = 1) WHERE (XMLEXISTS('$t0.shipAddress/*[City
= $t1.shipAddress/*/City]' PASSING t0.shipAddress AS "t0.shipAddress", t1.shipAddress AS "t1.shipAddress"))

-SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDER t0 JOIN TCUSTOMER t1 ON (1 = 1) WHERE (XMLEXISTS('$t0.shipAddress/*[City
= $t1.city]' PASSING t0.shipAddress AS "t0.shipAddress", t1.city AS "t1.city")) 
-SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDER t0 WHERE (XMLEXISTS('$t0.shipAddress/*[City = $Parm]' PASSING t0.shipAddress
AS "t0.shipAddress", CAST(? AS VARCHAR(254)) AS "Parm")) 
-SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDER t0 WHERE (XMLEXISTS('$t0.shipAddress/*[City = $Parm]' PASSING t0.shipAddress
AS "t0.shipAddress", CAST(? AS VARCHAR(254)) AS "Parm")) 
-SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDER t0 WHERE (XMLEXISTS('$t0.shipAddress/*[City = $Parm]' PASSING t0.shipAddress
AS "t0.shipAddress", CAST(? AS VARCHAR(254)) AS "Parm")) 
-SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDER t0 WHERE (XMLEXISTS('$t0.shipAddress/*[City = $Parm]' PASSING t0.shipAddress
AS "t0.shipAddress", CAST(? AS VARCHAR(254)) AS "Parm")) 
+SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDERXML t0 JOIN TORDERXML t1 ON (1 = 1) WHERE (XMLEXISTS('$t0.shipAddress/*[City
= $t1.shipAddress/*/City]' PASSING t0.shipAddress AS "t0.shipAddress", t1.shipAddress AS "t1.shipAddress"))

+SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDERXML t0 JOIN TCUSTOMER t1 ON (1 = 1) WHERE (XMLEXISTS('$t0.shipAddress/*[City
= $t1.city]' PASSING t0.shipAddress AS "t0.shipAddress", t1.city AS "t1.city")) 
+SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDERXML t0 WHERE (XMLEXISTS('$t0.shipAddress/*[City = $Parm]' PASSING
t0.shipAddress AS "t0.shipAddress", CAST(? AS VARCHAR(254)) AS "Parm")) 
+SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDERXML t0 WHERE (XMLEXISTS('$t0.shipAddress/*[City = $Parm]' PASSING
t0.shipAddress AS "t0.shipAddress", CAST(? AS VARCHAR(254)) AS "Parm")) 
+SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDERXML t0 WHERE (XMLEXISTS('$t0.shipAddress/*[City = $Parm]' PASSING
t0.shipAddress AS "t0.shipAddress", CAST(? AS VARCHAR(254)) AS "Parm")) 
+SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDERXML t0 WHERE (XMLEXISTS('$t0.shipAddress/*[City = $Parm]' PASSING
t0.shipAddress AS "t0.shipAddress", CAST(? AS VARCHAR(254)) AS "Parm")) 
 SELECT t0.version, t0.countryCode, t0.id, t0.city, t0.state, t0.street, t0.zip, t0.name FROM
TCUSTOMER t0 WHERE t0.countryCode = ? AND t0.id = ?  optimize for 1 row
-UPDATE TORDER SET shipAddress = ?, version = ? WHERE oid = ? AND version = ?
-SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDER t0 
+UPDATE TORDERXML SET shipAddress = ?, version = ? WHERE oid = ? AND version = ?
+SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDERXML t0 
 SELECT t0.version, t0.countryCode, t0.id, t0.city, t0.state, t0.street, t0.zip, t0.name FROM
TCUSTOMER t0 WHERE t0.countryCode = ? AND t0.id = ?  optimize for 1 row

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.mysql
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.mysql?rev=899851&r1=899850&r2=899851&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.mysql
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.mysql
Sat Jan 16 00:26:51 2010
@@ -15,8 +15,8 @@
 -- specific language governing permissions and limitations
 -- under the License.    
 
-SELECT t0.shipAddress, t0.oid FROM TORDER t0 ORDER BY t0.oid ASC
-SELECT t0.oid, t1.oid FROM TORDER t0 CROSS JOIN TORDER t1 WHERE (ExtractValue(t0.shipAddress,'/*/City')
= ExtractValue(t1.shipAddress,'/*/City')) ORDER BY t0.oid ASC
-SELECT t0.oid, t0.version, t0.amount, t0.CUSTOMER_COUNTRYCODE, t0.CUSTOMER_ID, t0.delivered,
t0.shipAddress FROM TORDER t0 CROSS JOIN TCUSTOMER t1 WHERE (ExtractValue(t0.shipAddress,'/*/City')
= t1.city)
-SELECT t0.oid, t0.version, t0.amount, t0.CUSTOMER_COUNTRYCODE, t0.CUSTOMER_ID, t0.delivered,
t0.shipAddress FROM TORDER t0 WHERE (ExtractValue(t0.shipAddress,'/*/City') = ?)
-SELECT t0.oid, t0.version, t0.amount, t0.CUSTOMER_COUNTRYCODE, t0.CUSTOMER_ID, t0.delivered,
t0.shipAddress FROM TORDER t0 WHERE (? = ExtractValue(t0.shipAddress,'/*/City'))
+SELECT t0.shipAddress, t0.oid FROM TORDERXML t0 ORDER BY t0.oid ASC
+SELECT t0.oid, t1.oid FROM TORDERXML t0 CROSS JOIN TORDERXML t1 WHERE (ExtractValue(t0.shipAddress,'/*/City')
= ExtractValue(t1.shipAddress,'/*/City')) ORDER BY t0.oid ASC
+SELECT t0.oid, t0.version, t0.amount, t0.CUSTOMER_COUNTRYCODE, t0.CUSTOMER_ID, t0.delivered,
t0.shipAddress FROM TORDERXML t0 CROSS JOIN TCUSTOMER t1 WHERE (ExtractValue(t0.shipAddress,'/*/City')
= t1.city)
+SELECT t0.oid, t0.version, t0.amount, t0.CUSTOMER_COUNTRYCODE, t0.CUSTOMER_ID, t0.delivered,
t0.shipAddress FROM TORDERXML t0 WHERE (ExtractValue(t0.shipAddress,'/*/City') = ?)
+SELECT t0.oid, t0.version, t0.amount, t0.CUSTOMER_COUNTRYCODE, t0.CUSTOMER_ID, t0.delivered,
t0.shipAddress FROM TORDERXML t0 WHERE (? = ExtractValue(t0.shipAddress,'/*/City'))

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.oracle
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.oracle?rev=899851&r1=899850&r2=899851&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.oracle
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.oracle
Sat Jan 16 00:26:51 2010
@@ -15,24 +15,24 @@
 -- specific language governing permissions and limitations
 -- under the License.    
 
-DELETE FROM TORDER t0
+DELETE FROM TORDERXML t0
 SELECT t0.countryCode, t0.id, t0.version, t0.city, t0.state, t0.street, t0.zip, t0.name FROM
TCUSTOMER t0
 DELETE FROM TCUSTOMER WHERE countryCode = ? AND id = ? AND version = ?
 DELETE FROM TCUSTOMER WHERE countryCode = ? AND id = ? AND version = ?
-INSERT INTO TORDER (oid, amount, delivered, shipAddress, version, customer_countryCode, customer_id)
VALUES (?, ?, ?, ?, ?, ?, ?)
-INSERT INTO TORDER (oid, amount, delivered, shipAddress, version, customer_countryCode, customer_id)
VALUES (?, ?, ?, ?, ?, ?, ?)
+INSERT INTO TORDERXML (oid, amount, delivered, shipAddress, version, customer_countryCode,
customer_id) VALUES (?, ?, ?, ?, ?, ?, ?)
+INSERT INTO TORDERXML (oid, amount, delivered, shipAddress, version, customer_countryCode,
customer_id) VALUES (?, ?, ?, ?, ?, ?, ?)
 INSERT INTO TCUSTOMER (countryCode, id, creditRating, name, version, city, state, street,
zip) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
 INSERT INTO TCUSTOMER (countryCode, id, creditRating, name, version, city, state, street,
zip) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
-SELECT t0.shipAddress.getStringVal() FROM TORDER t0
-SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress.getStringVal() FROM TORDER t0
+SELECT t0.shipAddress.getStringVal() FROM TORDERXML t0
+SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress.getStringVal() FROM TORDERXML t0
 SELECT t0.version, t0.countryCode, t0.id, t0.city, t0.state, t0.street, t0.zip, t0.name FROM
TCUSTOMER t0 WHERE t0.countryCode = ? AND t0.id = ?
-SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress.getStringVal() FROM TORDER t0, TORDER t1 WHERE (extractValue(t0.shipAddress,'/*/City')
= extractValue(t1.shipAddress,'/*/City'))
-SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress.getStringVal() FROM TORDER t0, TCUSTOMER t1 WHERE (extractValue(t0.shipAddress,'/*/City')
= t1.city)
-SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress.getStringVal() FROM TORDER t0 WHERE (extractValue(t0.shipAddress,'/*/City')
= ?)
-SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress.getStringVal() FROM TORDER t0 WHERE (extractValue(t0.shipAddress,'/*/City')
= ?)
-SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress.getStringVal() FROM TORDER t0 WHERE (extractValue(t0.shipAddress,'/*/City')
= ?)
-SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress.getStringVal() FROM TORDER t0 WHERE (extractValue(t0.shipAddress,'/*/City')
= ?)
+SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress.getStringVal() FROM TORDERXML t0, TORDERXML t1 WHERE (extractValue(t0.shipAddress,'/*/City')
= extractValue(t1.shipAddress,'/*/City'))
+SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress.getStringVal() FROM TORDERXML t0, TCUSTOMER t1 WHERE (extractValue(t0.shipAddress,'/*/City')
= t1.city)
+SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress.getStringVal() FROM TORDERXML t0 WHERE (extractValue(t0.shipAddress,'/*/City')
= ?)
+SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress.getStringVal() FROM TORDERXML t0 WHERE (extractValue(t0.shipAddress,'/*/City')
= ?)
+SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress.getStringVal() FROM TORDERXML t0 WHERE (extractValue(t0.shipAddress,'/*/City')
= ?)
+SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress.getStringVal() FROM TORDERXML t0 WHERE (extractValue(t0.shipAddress,'/*/City')
= ?)
 SELECT t0.version, t0.countryCode, t0.id, t0.city, t0.state, t0.street, t0.zip, t0.name FROM
TCUSTOMER t0 WHERE t0.countryCode = ? AND t0.id = ?
-UPDATE TORDER SET shipAddress = ?, version = ? WHERE oid = ? AND version = ?
-SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress.getStringVal() FROM TORDER t0
+UPDATE TORDERXML SET shipAddress = ?, version = ? WHERE oid = ? AND version = ?
+SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress.getStringVal() FROM TORDERXML t0
 SELECT t0.version, t0.countryCode, t0.id, t0.city, t0.state, t0.street, t0.zip, t0.name FROM
TCUSTOMER t0 WHERE t0.countryCode = ? AND t0.id = ?

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.postgres
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.postgres?rev=899851&r1=899850&r2=899851&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.postgres
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.postgres
Sat Jan 16 00:26:51 2010
@@ -15,8 +15,8 @@
 -- specific language governing permissions and limitations
 -- under the License.    
 
-SELECT t0.shipAddress, t0.oid FROM TORDER t0 ORDER BY t0.oid ASC
-SELECT t0.oid, t1.oid FROM TORDER t0 CROSS JOIN TORDER t1 WHERE (CAST((xpath('/*/City/text()',t0.shipAddress))[1]
AS VARCHAR) = CAST((xpath('/*/City/text()',t1.shipAddress))[1] AS VARCHAR)) ORDER BY t0.oid
ASC
-SELECT t0.oid, t0.version, t0.amount, t0.CUSTOMER_COUNTRYCODE, t0.CUSTOMER_ID, t0.delivered,
t0.shipAddress FROM TORDER t0 CROSS JOIN TCUSTOMER t1 WHERE (CAST((xpath('/*/City/text()',t0.shipAddress))[1]
AS VARCHAR) = t1.city)
-SELECT t0.oid, t0.version, t0.amount, t0.CUSTOMER_COUNTRYCODE, t0.CUSTOMER_ID, t0.delivered,
t0.shipAddress FROM TORDER t0 WHERE (CAST((xpath('/*/City/text()',t0.shipAddress))[1] AS VARCHAR)
= ?)
-SELECT t0.oid, t0.version, t0.amount, t0.CUSTOMER_COUNTRYCODE, t0.CUSTOMER_ID, t0.delivered,
t0.shipAddress FROM TORDER t0 WHERE (? = CAST((xpath('/*/City/text()',t0.shipAddress))[1]
AS VARCHAR))
+SELECT t0.shipAddress, t0.oid FROM TORDERXML t0 ORDER BY t0.oid ASC
+SELECT t0.oid, t1.oid FROM TORDERXML t0 CROSS JOIN TORDERXML t1 WHERE (CAST((xpath('/*/City/text()',t0.shipAddress))[1]
AS VARCHAR) = CAST((xpath('/*/City/text()',t1.shipAddress))[1] AS VARCHAR)) ORDER BY t0.oid
ASC
+SELECT t0.oid, t0.version, t0.amount, t0.CUSTOMER_COUNTRYCODE, t0.CUSTOMER_ID, t0.delivered,
t0.shipAddress FROM TORDERXML t0 CROSS JOIN TCUSTOMER t1 WHERE (CAST((xpath('/*/City/text()',t0.shipAddress))[1]
AS VARCHAR) = t1.city)
+SELECT t0.oid, t0.version, t0.amount, t0.CUSTOMER_COUNTRYCODE, t0.CUSTOMER_ID, t0.delivered,
t0.shipAddress FROM TORDERXML t0 WHERE (CAST((xpath('/*/City/text()',t0.shipAddress))[1] AS
VARCHAR) = ?)
+SELECT t0.oid, t0.version, t0.amount, t0.CUSTOMER_COUNTRYCODE, t0.CUSTOMER_ID, t0.delivered,
t0.shipAddress FROM TORDERXML t0 WHERE (? = CAST((xpath('/*/City/text()',t0.shipAddress))[1]
AS VARCHAR))

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.sqlserver
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.sqlserver?rev=899851&r1=899850&r2=899851&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.sqlserver
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.sqlserver
Sat Jan 16 00:26:51 2010
@@ -15,24 +15,24 @@
 -- specific language governing permissions and limitations
 -- under the License.    
 
-DELETE FROM TORDER
+DELETE FROM TORDERXML
 SELECT t0.countryCode, t0.id, t0.version, t0.city, t0.state, t0.street, t0.zip, t0.name FROM
TCUSTOMER t0
 DELETE FROM TCUSTOMER WHERE countryCode = ? AND id = ? AND version = ?
 DELETE FROM TCUSTOMER WHERE countryCode = ? AND id = ? AND version = ?
-INSERT INTO TORDER (oid, amount, delivered, shipAddress, version, customer_countryCode, customer_id)
VALUES (?, ?, ?, ?, ?, ?, ?)
-INSERT INTO TORDER (oid, amount, delivered, shipAddress, version, customer_countryCode, customer_id)
VALUES (?, ?, ?, ?, ?, ?, ?)
+INSERT INTO TORDERXML (oid, amount, delivered, shipAddress, version, customer_countryCode,
customer_id) VALUES (?, ?, ?, ?, ?, ?, ?)
+INSERT INTO TORDERXML (oid, amount, delivered, shipAddress, version, customer_countryCode,
customer_id) VALUES (?, ?, ?, ?, ?, ?, ?)
 INSERT INTO TCUSTOMER (countryCode, id, creditRating, name, version, city, state, street,
zip) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
 INSERT INTO TCUSTOMER (countryCode, id, creditRating, name, version, city, state, street,
zip) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
-SELECT t0.shipAddress FROM TORDER t0
-SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDER t0
+SELECT t0.shipAddress FROM TORDERXML t0
+SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDERXML t0
 SELECT t0.version, t0.countryCode, t0.id, t0.city, t0.state, t0.street, t0.zip, t0.name FROM
TCUSTOMER t0 WHERE t0.countryCode = ? AND t0.id = ?
-SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDER t0 CROSS JOIN TORDER t1 WHERE (t0.shipAddress.value('(/*/City/text())[1]','VARCHAR(255)')
= t1.shipAddress.value('(/*/City/text())[1]','VARCHAR(255)'))
-SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDER t0 CROSS JOIN TCUSTOMER t1 WHERE (t0.shipAddress.exist('/*[City
= sql:column("t1.city")]') = 1)
-SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDER t0 WHERE (t0.shipAddress.value('(/*/City/text())[1]','VARCHAR(255)')
= ?)
-SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDER t0 WHERE (t0.shipAddress.value('(/*/City/text())[1]','VARCHAR(255)')
= ?)
-SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDER t0 WHERE (t0.shipAddress.value('(/*/City/text())[1]','VARCHAR(255)')
= ?)
-SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDER t0 WHERE (t0.shipAddress.value('(/*/City/text())[1]','VARCHAR(255)')
= ?)
+SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDERXML t0 CROSS JOIN TORDERXML t1 WHERE (t0.shipAddress.value('(/*/City/text())[1]','VARCHAR(255)')
= t1.shipAddress.value('(/*/City/text())[1]','VARCHAR(255)'))
+SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDERXML t0 CROSS JOIN TCUSTOMER t1 WHERE (t0.shipAddress.exist('/*[City
= sql:column("t1.city")]') = 1)
+SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDERXML t0 WHERE (t0.shipAddress.value('(/*/City/text())[1]','VARCHAR(255)')
= ?)
+SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDERXML t0 WHERE (t0.shipAddress.value('(/*/City/text())[1]','VARCHAR(255)')
= ?)
+SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDERXML t0 WHERE (t0.shipAddress.value('(/*/City/text())[1]','VARCHAR(255)')
= ?)
+SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDERXML t0 WHERE (t0.shipAddress.value('(/*/City/text())[1]','VARCHAR(255)')
= ?)
 SELECT t0.version, t0.countryCode, t0.id, t0.city, t0.state, t0.street, t0.zip, t0.name FROM
TCUSTOMER t0 WHERE t0.countryCode = ? AND t0.id = ?
-UPDATE TORDER SET shipAddress = ?, version = ? WHERE oid = ? AND version = ?
-SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDER t0
+UPDATE TORDERXML SET shipAddress = ?, version = ? WHERE oid = ? AND version = ?
+SELECT t0.oid, t0.version, t0.amount, t0.customer_countryCode, t0.customer_id, t0.delivered,
t0.shipAddress FROM TORDERXML t0
 SELECT t0.version, t0.countryCode, t0.id, t0.city, t0.state, t0.street, t0.zip, t0.name FROM
TCUSTOMER t0 WHERE t0.countryCode = ? AND t0.id = ?



Mime
View raw message