HHH-4576 - Tests in MySQL using different case for objects as defined in configuration
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@17989 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
a1d2ece5cf
commit
e20713b0f2
|
@ -26,9 +26,9 @@
|
||||||
<!-- query-list name="currentEmployments"
|
<!-- query-list name="currentEmployments"
|
||||||
query-ref="organizationCurrentEmployments"-->
|
query-ref="organizationCurrentEmployments"-->
|
||||||
<loader query-ref="organization"/>
|
<loader query-ref="organization"/>
|
||||||
<sql-insert>INSERT INTO ORGANIZATION (NAME, ORGID) VALUES ( UPPER(?), ? )</sql-insert>
|
<sql-insert>INSERT INTO Organization (NAME, ORGID) VALUES ( UPPER(?), ? )</sql-insert>
|
||||||
<sql-update>UPDATE ORGANIZATION SET NAME=UPPER(?) WHERE ORGID=?</sql-update>
|
<sql-update>UPDATE Organization SET NAME=UPPER(?) WHERE ORGID=?</sql-update>
|
||||||
<sql-delete>DELETE FROM ORGANIZATION WHERE ORGID=?</sql-delete>
|
<sql-delete>DELETE FROM Organization WHERE ORGID=?</sql-delete>
|
||||||
</class>
|
</class>
|
||||||
|
|
||||||
<class name="Person">
|
<class name="Person">
|
||||||
|
@ -37,9 +37,9 @@
|
||||||
</id>
|
</id>
|
||||||
<property name="name" not-null="true"/>
|
<property name="name" not-null="true"/>
|
||||||
<loader query-ref="person"/>
|
<loader query-ref="person"/>
|
||||||
<sql-insert>INSERT INTO PERSON (NAME, PERID) VALUES ( UPPER(?), ? )</sql-insert>
|
<sql-insert>INSERT INTO Person (NAME, PERID) VALUES ( UPPER(?), ? )</sql-insert>
|
||||||
<sql-update>UPDATE PERSON SET NAME=UPPER(?) WHERE PERID=?</sql-update>
|
<sql-update>UPDATE Person SET NAME=UPPER(?) WHERE PERID=?</sql-update>
|
||||||
<sql-delete>DELETE FROM PERSON WHERE PERID=?</sql-delete>
|
<sql-delete>DELETE FROM Person WHERE PERID=?</sql-delete>
|
||||||
</class>
|
</class>
|
||||||
|
|
||||||
<class name="Employment">
|
<class name="Employment">
|
||||||
|
@ -57,12 +57,12 @@
|
||||||
</property>
|
</property>
|
||||||
<loader query-ref="employment"/>
|
<loader query-ref="employment"/>
|
||||||
<sql-insert>
|
<sql-insert>
|
||||||
INSERT INTO EMPLOYMENT
|
INSERT INTO Employment
|
||||||
(EMPLOYEE, EMPLOYER, STARTDATE, REGIONCODE, VALUE, CURRENCY, EMPID)
|
(EMPLOYEE, EMPLOYER, STARTDATE, REGIONCODE, VALUE, CURRENCY, EMPID)
|
||||||
VALUES (?, ?, now(), UPPER(?), ?, ?, ?)
|
VALUES (?, ?, now(), UPPER(?), ?, ?, ?)
|
||||||
</sql-insert>
|
</sql-insert>
|
||||||
<sql-update>UPDATE EMPLOYMENT SET ENDDATE=?, VALUE=?, CURRENCY=? WHERE EMPID=?</sql-update>
|
<sql-update>UPDATE Employment SET ENDDATE=?, VALUE=?, CURRENCY=? WHERE EMPID=?</sql-update>
|
||||||
<sql-delete>DELETE FROM EMPLOYMENT WHERE EMPID=?</sql-delete>
|
<sql-delete>DELETE FROM Employment WHERE EMPID=?</sql-delete>
|
||||||
</class>
|
</class>
|
||||||
|
|
||||||
<class name="TextHolder">
|
<class name="TextHolder">
|
||||||
|
@ -72,12 +72,12 @@
|
||||||
<property name="description" type="text" length="15000"/>
|
<property name="description" type="text" length="15000"/>
|
||||||
<loader query-ref="textholder"/>
|
<loader query-ref="textholder"/>
|
||||||
<sql-insert>
|
<sql-insert>
|
||||||
INSERT INTO TEXTHOLDER
|
INSERT INTO TextHolder
|
||||||
(DESCRIPTION, ID)
|
(DESCRIPTION, ID)
|
||||||
VALUES (?, ?)
|
VALUES (?, ?)
|
||||||
</sql-insert>
|
</sql-insert>
|
||||||
<sql-update>UPDATE TEXTHOLDER SET DESCRIPTION=? WHERE ID=?</sql-update>
|
<sql-update>UPDATE TextHolder SET DESCRIPTION=? WHERE ID=?</sql-update>
|
||||||
<sql-delete>DELETE FROM TEXTHOLDER WHERE ID=?</sql-delete>
|
<sql-delete>DELETE FROM TextHolder WHERE ID=?</sql-delete>
|
||||||
</class>
|
</class>
|
||||||
|
|
||||||
<class name="ImageHolder">
|
<class name="ImageHolder">
|
||||||
|
@ -87,12 +87,12 @@
|
||||||
<property name="photo" type="image" length="15000"/>
|
<property name="photo" type="image" length="15000"/>
|
||||||
<loader query-ref="imageholder"/>
|
<loader query-ref="imageholder"/>
|
||||||
<sql-insert>
|
<sql-insert>
|
||||||
INSERT INTO IMAGEHOLDER
|
INSERT INTO ImageHolder
|
||||||
(PHOTO, ID)
|
(PHOTO, ID)
|
||||||
VALUES (?, ?)
|
VALUES (?, ?)
|
||||||
</sql-insert>
|
</sql-insert>
|
||||||
<sql-update>UPDATE IMAGEHOLDER SET PHOTO=? WHERE ID=?</sql-update>
|
<sql-update>UPDATE ImageHolder SET PHOTO=? WHERE ID=?</sql-update>
|
||||||
<sql-delete>DELETE FROM IMAGEHOLDER WHERE ID=?</sql-delete>
|
<sql-delete>DELETE FROM ImageHolder WHERE ID=?</sql-delete>
|
||||||
</class>
|
</class>
|
||||||
|
|
||||||
<resultset name="org-emp-regionCode">
|
<resultset name="org-emp-regionCode">
|
||||||
|
@ -109,15 +109,15 @@
|
||||||
|
|
||||||
<sql-query name="person">
|
<sql-query name="person">
|
||||||
<return alias="p" class="Person" lock-mode="upgrade"/>
|
<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>
|
||||||
|
|
||||||
<sql-query name="organization">
|
<sql-query name="organization">
|
||||||
<return alias="org" class="Organization"/>
|
<return alias="org" class="Organization"/>
|
||||||
<return-join alias="emp" property="org.employments"/>
|
<return-join alias="emp" property="org.employments"/>
|
||||||
SELECT {org.*}, {emp.*}
|
SELECT {org.*}, {emp.*}
|
||||||
FROM ORGANIZATION org
|
FROM Organization org
|
||||||
LEFT OUTER JOIN EMPLOYMENT emp ON org.ORGID = emp.EMPLOYER
|
LEFT OUTER JOIN Employment emp ON org.ORGID = emp.EMPLOYER
|
||||||
WHERE org.ORGID=?
|
WHERE org.ORGID=?
|
||||||
</sql-query>
|
</sql-query>
|
||||||
|
|
||||||
|
@ -132,8 +132,8 @@
|
||||||
<sql-query name="allOrganizationsWithEmployees" flush-mode="never">
|
<sql-query name="allOrganizationsWithEmployees" flush-mode="never">
|
||||||
<return alias="org" class="Organization"/>
|
<return alias="org" class="Organization"/>
|
||||||
SELECT DISTINCT org.NAME AS {org.name}, org.ORGID AS {org.id}
|
SELECT DISTINCT org.NAME AS {org.name}, org.ORGID AS {org.id}
|
||||||
FROM ORGANIZATION org
|
FROM Organization org
|
||||||
INNER JOIN EMPLOYMENT e ON e.EMPLOYER = org.ORGID
|
INNER JOIN Employment e ON e.EMPLOYER = org.ORGID
|
||||||
</sql-query>
|
</sql-query>
|
||||||
|
|
||||||
<sql-query name="employment">
|
<sql-query name="employment">
|
||||||
|
@ -141,7 +141,7 @@
|
||||||
SELECT EMPLOYEE AS {emp.employee}, EMPLOYER AS {emp.employer},
|
SELECT EMPLOYEE AS {emp.employee}, EMPLOYER AS {emp.employer},
|
||||||
STARTDATE AS {emp.startDate}, ENDDATE AS {emp.endDate},
|
STARTDATE AS {emp.startDate}, ENDDATE AS {emp.endDate},
|
||||||
REGIONCODE as {emp.regionCode}, EMPID AS {emp.id}
|
REGIONCODE as {emp.regionCode}, EMPID AS {emp.id}
|
||||||
FROM EMPLOYMENT
|
FROM Employment
|
||||||
WHERE EMPID = ?
|
WHERE EMPID = ?
|
||||||
</sql-query>
|
</sql-query>
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@
|
||||||
<sql-query name="organizationEmployments">
|
<sql-query name="organizationEmployments">
|
||||||
<load-collection alias="empcol" role="Organization.employments"/>
|
<load-collection alias="empcol" role="Organization.employments"/>
|
||||||
SELECT {empcol.*}
|
SELECT {empcol.*}
|
||||||
FROM EMPLOYMENT empcol
|
FROM Employment empcol
|
||||||
WHERE EMPLOYER = :id
|
WHERE EMPLOYER = :id
|
||||||
ORDER BY STARTDATE ASC, EMPLOYEE ASC
|
ORDER BY STARTDATE ASC, EMPLOYEE ASC
|
||||||
</sql-query>
|
</sql-query>
|
||||||
|
@ -170,7 +170,7 @@
|
||||||
SELECT EMPLOYEE AS {emp.employee}, EMPLOYER AS {emp.employer},
|
SELECT EMPLOYEE AS {emp.employee}, EMPLOYER AS {emp.employer},
|
||||||
STARTDATE AS {emp.startDate}, ENDDATE AS {emp.endDate},
|
STARTDATE AS {emp.startDate}, ENDDATE AS {emp.endDate},
|
||||||
REGIONCODE as {emp.regionCode}, EMPID AS {emp.id}, VALUE, CURRENCY
|
REGIONCODE as {emp.regionCode}, EMPID AS {emp.id}, VALUE, CURRENCY
|
||||||
FROM EMPLOYMENT
|
FROM Employment
|
||||||
WHERE EMPLOYER = :id AND ENDDATE IS NULL
|
WHERE EMPLOYER = :id AND ENDDATE IS NULL
|
||||||
ORDER BY STARTDATE ASC
|
ORDER BY STARTDATE ASC
|
||||||
</sql-query>
|
</sql-query>
|
||||||
|
@ -213,12 +213,12 @@
|
||||||
|
|
||||||
<sql-query name="textholder">
|
<sql-query name="textholder">
|
||||||
<return alias="h" class="TextHolder" lock-mode="upgrade"/>
|
<return alias="h" class="TextHolder" lock-mode="upgrade"/>
|
||||||
SELECT ID AS {h.id}, DESCRIPTION AS {h.description} FROM TEXTHOLDER WHERE ID=? /*FOR UPDATE*/
|
SELECT ID AS {h.id}, DESCRIPTION AS {h.description} FROM TextHolder WHERE ID=? /*FOR UPDATE*/
|
||||||
</sql-query>
|
</sql-query>
|
||||||
|
|
||||||
<sql-query name="imageholder">
|
<sql-query name="imageholder">
|
||||||
<return alias="h" class="ImageHolder" lock-mode="upgrade"/>
|
<return alias="h" class="ImageHolder" lock-mode="upgrade"/>
|
||||||
SELECT ID AS {h.id}, PHOTO AS {h.photo} FROM IMAGEHOLDER WHERE ID=? /*FOR UPDATE*/
|
SELECT ID AS {h.id}, PHOTO AS {h.photo} FROM ImageHolder WHERE ID=? /*FOR UPDATE*/
|
||||||
</sql-query>
|
</sql-query>
|
||||||
|
|
||||||
<database-object>
|
<database-object>
|
||||||
|
@ -226,7 +226,7 @@
|
||||||
CREATE PROCEDURE selectAllEmployments ()
|
CREATE PROCEDURE selectAllEmployments ()
|
||||||
SELECT EMPLOYEE, EMPLOYER, STARTDATE, ENDDATE,
|
SELECT EMPLOYEE, EMPLOYER, STARTDATE, ENDDATE,
|
||||||
REGIONCODE, EMPID, VALUE, CURRENCY
|
REGIONCODE, EMPID, VALUE, CURRENCY
|
||||||
FROM EMPLOYMENT
|
FROM Employment
|
||||||
</create>
|
</create>
|
||||||
<drop>
|
<drop>
|
||||||
DROP PROCEDURE selectAllEmployments
|
DROP PROCEDURE selectAllEmployments
|
||||||
|
|
Loading…
Reference in New Issue