Author: stliu
Date: 2009-11-16 08:50:49 -0500 (Mon, 16 Nov 2009)
New Revision: 17987
Modified:
core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/sql/hand/custom/mysql/Mappings.hbm.xml
Log:
JBPAPP-3067 HHH-4576 - Tests in MySQL using different case for objects as defined in
configuration
Modified:
core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/sql/hand/custom/mysql/Mappings.hbm.xml
===================================================================
---
core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/sql/hand/custom/mysql/Mappings.hbm.xml 2009-11-16
13:50:05 UTC (rev 17986)
+++
core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/sql/hand/custom/mysql/Mappings.hbm.xml 2009-11-16
13:50:49 UTC (rev 17987)
@@ -26,9 +26,9 @@
<!-- query-list name="currentEmployments"
query-ref="organizationCurrentEmployments"-->
<loader query-ref="organization"/>
- <sql-insert>INSERT INTO ORGANIZATION (NAME, ORGID) VALUES ( UPPER(?), ?
)</sql-insert>
- <sql-update>UPDATE ORGANIZATION SET NAME=UPPER(?) WHERE
ORGID=?</sql-update>
- <sql-delete>DELETE FROM ORGANIZATION WHERE ORGID=?</sql-delete>
+ <sql-insert>INSERT INTO Organization (NAME, ORGID) VALUES ( UPPER(?), ?
)</sql-insert>
+ <sql-update>UPDATE Organization SET NAME=UPPER(?) WHERE
ORGID=?</sql-update>
+ <sql-delete>DELETE FROM Organization WHERE ORGID=?</sql-delete>
</class>
<class name="Person">
@@ -37,9 +37,9 @@
</id>
<property name="name" not-null="true"/>
<loader query-ref="person"/>
- <sql-insert>INSERT INTO PERSON (NAME, PERID) VALUES ( UPPER(?), ?
)</sql-insert>
- <sql-update>UPDATE PERSON SET NAME=UPPER(?) WHERE PERID=?</sql-update>
- <sql-delete>DELETE FROM PERSON WHERE PERID=?</sql-delete>
+ <sql-insert>INSERT INTO Person (NAME, PERID) VALUES ( UPPER(?), ?
)</sql-insert>
+ <sql-update>UPDATE Person SET NAME=UPPER(?) WHERE PERID=?</sql-update>
+ <sql-delete>DELETE FROM Person WHERE PERID=?</sql-delete>
</class>
<class name="Employment">
@@ -57,12 +57,12 @@
</property>
<loader query-ref="employment"/>
<sql-insert>
- INSERT INTO EMPLOYMENT
+ INSERT INTO Employment
(EMPLOYEE, EMPLOYER, STARTDATE, REGIONCODE, VALUE, CURRENCY, EMPID)
VALUES (?, ?, now(), UPPER(?), ?, ?, ?)
</sql-insert>
- <sql-update>UPDATE EMPLOYMENT SET ENDDATE=?, VALUE=?, CURRENCY=? WHERE
EMPID=?</sql-update>
- <sql-delete>DELETE FROM EMPLOYMENT WHERE EMPID=?</sql-delete>
+ <sql-update>UPDATE Employment SET ENDDATE=?, VALUE=?, CURRENCY=? WHERE
EMPID=?</sql-update>
+ <sql-delete>DELETE FROM Employment WHERE EMPID=?</sql-delete>
</class>
<resultset name="org-emp-regionCode">
@@ -79,15 +79,15 @@
<sql-query name="person">
<return alias="p" class="Person"
lock-mode="upgrade"/>
- SELECT NAME AS {p.name}, PERID AS {p.id} FROM PERSON WHERE PERID=? /*FOR UPDATE*/
+ SELECT NAME AS {p.name}, PERID AS {p.id} FROM Person WHERE PERID=? /*FOR UPDATE*/
</sql-query>
<sql-query name="organization">
<return alias="org" class="Organization"/>
<return-join alias="emp" property="org.employments"/>
SELECT {org.*}, {emp.*}
- FROM ORGANIZATION org
- LEFT OUTER JOIN EMPLOYMENT emp ON org.ORGID = emp.EMPLOYER
+ FROM Organization org
+ LEFT OUTER JOIN Employment emp ON org.ORGID = emp.EMPLOYER
WHERE org.ORGID=?
</sql-query>
@@ -102,8 +102,8 @@
<sql-query name="allOrganizationsWithEmployees"
flush-mode="never">
<return alias="org" class="Organization"/>
SELECT DISTINCT org.NAME AS {org.name}, org.ORGID AS {org.id}
- FROM ORGANIZATION org
- INNER JOIN EMPLOYMENT e ON e.EMPLOYER = org.ORGID
+ FROM Organization org
+ INNER JOIN Employment e ON e.EMPLOYER = org.ORGID
</sql-query>
<sql-query name="employment">
@@ -111,7 +111,7 @@
SELECT EMPLOYEE AS {emp.employee}, EMPLOYER AS {emp.employer},
STARTDATE AS {emp.startDate}, ENDDATE AS {emp.endDate},
REGIONCODE as {emp.regionCode}, EMPID AS {emp.id}
- FROM EMPLOYMENT
+ FROM Employment
WHERE EMPID = ?
</sql-query>
@@ -119,7 +119,7 @@
<sql-query name="organizationEmployments">
<load-collection alias="empcol"
role="Organization.employments"/>
SELECT {empcol.*}
- FROM EMPLOYMENT empcol
+ FROM Employment empcol
WHERE EMPLOYER = :id
ORDER BY STARTDATE ASC, EMPLOYEE ASC
</sql-query>
@@ -140,7 +140,7 @@
SELECT EMPLOYEE AS {emp.employee}, EMPLOYER AS {emp.employer},
STARTDATE AS {emp.startDate}, ENDDATE AS {emp.endDate},
REGIONCODE as {emp.regionCode}, EMPID AS {emp.id}, VALUE, CURRENCY
- FROM EMPLOYMENT
+ FROM Employment
WHERE EMPLOYER = :id AND ENDDATE IS NULL
ORDER BY STARTDATE ASC
</sql-query>
@@ -186,7 +186,7 @@
CREATE PROCEDURE selectAllEmployments ()
SELECT EMPLOYEE, EMPLOYER, STARTDATE, ENDDATE,
REGIONCODE, EMPID, VALUE, CURRENCY
- FROM EMPLOYMENT
+ FROM Employment
</create>
<drop>
DROP PROCEDURE selectAllEmployments