diff --git a/hibernate-core/src/test/java/org/hibernate/test/legacy/Fo.hbm.xml b/hibernate-core/src/test/java/org/hibernate/test/legacy/Fo.hbm.xml
index 2e84d088d9..1e249a7523 100644
--- a/hibernate-core/src/test/java/org/hibernate/test/legacy/Fo.hbm.xml
+++ b/hibernate-core/src/test/java/org/hibernate/test/legacy/Fo.hbm.xml
@@ -10,7 +10,6 @@
-
diff --git a/hibernate-core/src/test/java/org/hibernate/test/legacy/Fum.hbm.xml b/hibernate-core/src/test/java/org/hibernate/test/legacy/Fum.hbm.xml
index bc9a35abf5..7beed901dd 100644
--- a/hibernate-core/src/test/java/org/hibernate/test/legacy/Fum.hbm.xml
+++ b/hibernate-core/src/test/java/org/hibernate/test/legacy/Fum.hbm.xml
@@ -12,7 +12,6 @@
-
@@ -21,13 +20,11 @@
-
-
@@ -35,7 +32,6 @@
-
@@ -51,7 +47,6 @@
-
@@ -60,7 +55,6 @@
-
diff --git a/hibernate-core/src/test/java/org/hibernate/test/legacy/Fum.java b/hibernate-core/src/test/java/org/hibernate/test/legacy/Fum.java
index 3e07394122..e72a6fae15 100644
--- a/hibernate-core/src/test/java/org/hibernate/test/legacy/Fum.java
+++ b/hibernate-core/src/test/java/org/hibernate/test/legacy/Fum.java
@@ -31,7 +31,6 @@ public class Fum implements Lifecycle, Serializable {
this.id = id;
friends = new HashSet();
FumCompositeID fid = new FumCompositeID();
- fid.setDate( Calendar.getInstance() );
fid.setShort( (short) ( id.short_ + 33 ) );
fid.setString( id.string_ + "dd" );
Fum f = new Fum();
diff --git a/hibernate-core/src/test/java/org/hibernate/test/legacy/FumCompositeID.java b/hibernate-core/src/test/java/org/hibernate/test/legacy/FumCompositeID.java
index b1f36a3f18..5283a0cb7b 100644
--- a/hibernate-core/src/test/java/org/hibernate/test/legacy/FumCompositeID.java
+++ b/hibernate-core/src/test/java/org/hibernate/test/legacy/FumCompositeID.java
@@ -1,14 +1,10 @@
//$Id: FumCompositeID.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy;
-import java.util.Calendar;
public class FumCompositeID implements java.io.Serializable {
String string_;
- // this CANNOT be a Date -- they are forcefully stripped of time, changing the PK
- // TODO: having a date/calendar as a PK is horrible...
- Calendar date_;
short short_;
public boolean equals(Object other) {
FumCompositeID that = (FumCompositeID) other;
@@ -23,12 +19,6 @@ public class FumCompositeID implements java.io.Serializable {
public void setString(String string_) {
this.string_ = string_;
}
- public Calendar getDate() {
- return date_;
- }
- public void setDate(Calendar date_) {
- this.date_ = date_;
- }
public short getShort() {
return short_;
}
diff --git a/hibernate-core/src/test/java/org/hibernate/test/legacy/FumTest.java b/hibernate-core/src/test/java/org/hibernate/test/legacy/FumTest.java
index f3c7f94d97..c944b67d4c 100644
--- a/hibernate-core/src/test/java/org/hibernate/test/legacy/FumTest.java
+++ b/hibernate-core/src/test/java/org/hibernate/test/legacy/FumTest.java
@@ -16,7 +16,6 @@ import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
-import java.util.GregorianCalendar;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
@@ -25,7 +24,6 @@ import java.util.Map;
import java.util.Properties;
import java.util.Set;
-import org.junit.Test;
import org.hibernate.Criteria;
import org.hibernate.FetchMode;
import org.hibernate.FlushMode;
@@ -312,18 +310,6 @@ public class FumTest extends LegacyTestCase {
private static FumCompositeID fumKey(String str, boolean aCompositeQueryTest) {
FumCompositeID id = new FumCompositeID();
- if ( getDialect() instanceof MckoiDialect ) {
- GregorianCalendar now = new GregorianCalendar();
- GregorianCalendar cal = new GregorianCalendar(
- now.get(java.util.Calendar.YEAR),
- now.get(java.util.Calendar.MONTH),
- now.get(java.util.Calendar.DATE)
- );
- id.setDate( cal );
- }
- else {
- id.setDate( Calendar.getInstance() );
- }
id.setString( str );
if (aCompositeQueryTest) {
@@ -442,40 +428,33 @@ public class FumTest extends LegacyTestCase {
fum = (Fum)vList.get(0);
assertTrue( "find by composite key query (check fo object)", fum.getId().getString().equals("fo") );
- // Try to find the Fum object "fi" that we inserted searching by the date in the id
+ // Try to find the Fum object "fi" that we inserted
vList = s.createQuery( "from Fum fum where fum.id.short = ?" )
.setParameter( 0, new Short(fiShort), StandardBasicTypes.SHORT )
.list();
assertEquals( "find by composite key query (find fi object)", 1, vList.size() );
fi = (Fum)vList.get(0);
assertEquals( "find by composite key query (check fi object)", "fi", fi.getId().getString() );
-
- // Make sure we can return all of the objects by searching by the date id
- vList = s.createQuery( "from Fum fum where fum.id.date <= ? and not fum.fum='FRIEND'" )
- .setParameter( 0, Calendar.getInstance(), StandardBasicTypes.CALENDAR )
- .list();
- assertEquals( "find by composite key query with arguments", 4, vList.size() );
s.getTransaction().commit();
s.close();
s = openSession();
s.beginTransaction();
assertTrue(
- s.createQuery( "select fum.id.short, fum.id.date, fum.id.string from Fum fum" ).iterate().hasNext()
+ s.createQuery( "select fum.id.short, fum.id.string from Fum fum" ).iterate().hasNext()
);
assertTrue(
s.createQuery( "select fum.id from Fum fum" ).iterate().hasNext()
);
- Query qu = s.createQuery("select fum.fum, fum , fum.fum, fum.id.date from Fum fum");
+ Query qu = s.createQuery("select fum.fum, fum , fum.fum from Fum fum");
Type[] types = qu.getReturnTypes();
- assertTrue(types.length==4);
+ assertTrue(types.length==3);
for ( int k=0; k
-
diff --git a/hibernate-core/src/test/java/org/hibernate/test/legacy/Qux.hbm.xml b/hibernate-core/src/test/java/org/hibernate/test/legacy/Qux.hbm.xml
index 264e106e5d..aa65ddd134 100644
--- a/hibernate-core/src/test/java/org/hibernate/test/legacy/Qux.hbm.xml
+++ b/hibernate-core/src/test/java/org/hibernate/test/legacy/Qux.hbm.xml
@@ -22,7 +22,6 @@
-