|
From: <one...@us...> - 2002-11-20 14:20:14
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/test
In directory sc8-pr-cvs1:/tmp/cvs-serv26814/hibernate/test
Modified Files:
ABC.hbm.xml ABCProxy.hbm.xml Baz.hbm.xml Container.hbm.xml
FooBarTest.java MasterDetailTest.java ParentChildTest.java
SQLFunctionsTest.java SingleSeveral.hbm.xml Stuff.hbm.xml
Log Message:
got tests working for firebird
Index: ABC.hbm.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/ABC.hbm.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ABC.hbm.xml 25 Oct 2002 12:26:12 -0000 1.2
--- ABC.hbm.xml 20 Nov 2002 14:20:09 -0000 1.3
***************
*** 10,14 ****
<property name="name"/>
<subclass name="cirrus.hibernate.test.B" discriminator-value="-1">
! <property name="count"/>
<subclass name="cirrus.hibernate.test.C1" discriminator-value="1">
<property name="address" column="c1"/>
--- 10,14 ----
<property name="name"/>
<subclass name="cirrus.hibernate.test.B" discriminator-value="-1">
! <property name="count" column="count_"/>
<subclass name="cirrus.hibernate.test.C1" discriminator-value="1">
<property name="address" column="c1"/>
Index: ABCProxy.hbm.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/ABCProxy.hbm.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ABCProxy.hbm.xml 25 Oct 2002 18:30:51 -0000 1.1
--- ABCProxy.hbm.xml 20 Nov 2002 14:20:09 -0000 1.2
***************
*** 10,14 ****
<property name="name"/>
<subclass name="cirrus.hibernate.test.B" discriminator-value="-1" proxy="cirrus.hibernate.test.B">
! <property name="count"/>
<subclass name="cirrus.hibernate.test.C1" discriminator-value="1" proxy="cirrus.hibernate.test.C1">
<property name="address" column="c1"/>
--- 10,14 ----
<property name="name"/>
<subclass name="cirrus.hibernate.test.B" discriminator-value="-1" proxy="cirrus.hibernate.test.B">
! <property name="count" column="count_"/>
<subclass name="cirrus.hibernate.test.C1" discriminator-value="1" proxy="cirrus.hibernate.test.C1">
<property name="address" column="c1"/>
Index: Baz.hbm.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/Baz.hbm.xml,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** Baz.hbm.xml 5 Nov 2002 13:40:53 -0000 1.20
--- Baz.hbm.xml 20 Nov 2002 14:20:09 -0000 1.21
***************
*** 8,12 ****
<generator class="uuid.hex"/>
</generated-key>
! <element column="element" type="string" not-null="true"/>
</set>
--- 8,12 ----
<generator class="uuid.hex"/>
</generated-key>
! <element column="element" type="string" not-null="true" length="32"/>
</set>
***************
*** 202,206 ****
</key>
<composite-index class="cirrus.hibernate.test.FooComponent">
! <key-property name="name"/>
<key-property name="count" column="count_"/>
</composite-index>
--- 202,206 ----
</key>
<composite-index class="cirrus.hibernate.test.FooComponent">
! <key-property name="name" length="32"/>
<key-property name="count" column="count_"/>
</composite-index>
Index: Container.hbm.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/Container.hbm.xml,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Container.hbm.xml 30 Oct 2002 13:34:25 -0000 1.9
--- Container.hbm.xml 20 Nov 2002 14:20:09 -0000 1.10
***************
*** 43,47 ****
<map role="ternaryMap">
<key column="container_id"/>
! <index column="idx" type="string"/>
<composite-element class="cirrus.hibernate.test.Container$Ternary">
<property name="name"/>
--- 43,47 ----
<map role="ternaryMap">
<key column="container_id"/>
! <index column="idx" type="string" length="32"/>
<composite-element class="cirrus.hibernate.test.Container$Ternary">
<property name="name"/>
Index: FooBarTest.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/FooBarTest.java,v
retrieving revision 1.223
retrieving revision 1.224
diff -C2 -d -r1.223 -r1.224
*** FooBarTest.java 20 Nov 2002 10:30:45 -0000 1.223
--- FooBarTest.java 20 Nov 2002 14:20:09 -0000 1.224
***************
*** 2729,2733 ****
try {
TestCase.exportSchema( new String[] {
! "FooBar.hbm.xml", "Baz.hbm.xml", "Qux.hbm.xml", "Glarch.hbm.xml", "Fum.hbm.xml", "Fumm.hbm.xml", "Fo.hbm.xml", "One.hbm.xml", "Many.hbm.xml", "Immutable.hbm.xml", "Fee.hbm.xml", "Vetoer.hbm.xml", "Holder.hbm.xml", "Location.hbm.xml", "Stuff.hbm.xml"
} );
return new TestSuite(FooBarTest.class);
--- 2729,2749 ----
try {
TestCase.exportSchema( new String[] {
! "FooBar.hbm.xml",
! "Baz.hbm.xml",
! "Qux.hbm.xml",
! "Glarch.hbm.xml",
! "Fum.hbm.xml",
! "Fumm.hbm.xml",
! "Fo.hbm.xml",
! "One.hbm.xml",
! "Many.hbm.xml",
! "Immutable.hbm.xml",
! "Fee.hbm.xml",
! "Vetoer.hbm.xml",
! "Holder.hbm.xml",
! "Location.hbm.xml",
! "Stuff.hbm.xml",
! "Container.hbm.xml",
! "Simple.hbm.xml"
} );
return new TestSuite(FooBarTest.class);
Index: MasterDetailTest.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/MasterDetailTest.java,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** MasterDetailTest.java 7 Nov 2002 11:33:49 -0000 1.40
--- MasterDetailTest.java 20 Nov 2002 14:20:10 -0000 1.41
***************
*** 230,233 ****
--- 230,234 ----
Query q = s.getNamedQuery("all_details");
q.list();
+ s.connection().commit();
s.close();
}
***************
*** 415,419 ****
s.iterate("from c in class Category where c.name = cirrus.hibernate.test.Category.ROOT_CATEGORY").hasNext()
);
!
s.close();
--- 416,420 ----
s.iterate("from c in class Category where c.name = cirrus.hibernate.test.Category.ROOT_CATEGORY").hasNext()
);
! s.connection().commit();
s.close();
***************
*** 471,475 ****
public static Test suite() throws Exception {
TestCase.exportSchema(
! new String[] { "MasterDetail.hbm.xml", "Custom.hbm.xml", "Category.hbm.xml", "Nameable.hbm.xml", "SingleSeveral.hbm.xml" }
);
return new TestSuite(MasterDetailTest.class);
--- 472,482 ----
public static Test suite() throws Exception {
TestCase.exportSchema(
! new String[] {
! "MasterDetail.hbm.xml",
! "Custom.hbm.xml",
! "Category.hbm.xml",
! "Nameable.hbm.xml",
! "SingleSeveral.hbm.xml"
! }
);
return new TestSuite(MasterDetailTest.class);
Index: ParentChildTest.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/ParentChildTest.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** ParentChildTest.java 23 Oct 2002 18:21:58 -0000 1.29
--- ParentChildTest.java 20 Nov 2002 14:20:10 -0000 1.30
***************
*** 499,503 ****
try {
TestCase.exportSchema( new String[] {
! "FooBar.hbm.xml", "Baz.hbm.xml", "Qux.hbm.xml", "Glarch.hbm.xml", "Fum.hbm.xml", "Fumm.hbm.xml", "Fo.hbm.xml", "One.hbm.xml", "Many.hbm.xml", "Immutable.hbm.xml", "Fee.hbm.xml", "Vetoer.hbm.xml", "Holder.hbm.xml", "ParentChild.hbm.xml", "Simple.hbm.xml", "Container.hbm.xml", "Circular.hbm.xml"
} );
return new TestSuite(ParentChildTest.class);
--- 499,520 ----
try {
TestCase.exportSchema( new String[] {
! "FooBar.hbm.xml",
! "Baz.hbm.xml",
! "Qux.hbm.xml",
! "Glarch.hbm.xml",
! "Fum.hbm.xml",
! "Fumm.hbm.xml",
! "Fo.hbm.xml",
! "One.hbm.xml",
! "Many.hbm.xml",
! "Immutable.hbm.xml",
! "Fee.hbm.xml",
! "Vetoer.hbm.xml",
! "Holder.hbm.xml",
! "ParentChild.hbm.xml",
! "Simple.hbm.xml",
! "Container.hbm.xml",
! "Circular.hbm.xml",
! "Stuff.hbm.xml"
} );
return new TestSuite(ParentChildTest.class);
Index: SQLFunctionsTest.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/SQLFunctionsTest.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** SQLFunctionsTest.java 20 Nov 2002 07:06:45 -0000 1.32
--- SQLFunctionsTest.java 20 Nov 2002 14:20:10 -0000 1.33
***************
*** 7,10 ****
--- 7,11 ----
import cirrus.hibernate.*;
import cirrus.hibernate.sql.DB2Dialect;
+ import cirrus.hibernate.sql.InterbaseDialect;
import cirrus.hibernate.sql.MySQLDialect;
import cirrus.hibernate.sql.SAPDBDialect;
***************
*** 39,52 ****
s.find("from s in class Simple where not( upper( s.name ) ='yada' or 1=2 or 'foo'='bar' or not('foo'='foo') or 'foo' like 'bar' )").size()==1
);
! if ( !(dialect instanceof MySQLDialect) && !(dialect instanceof SybaseDialect)) { //My SQL has a funny concatenation operator
assertTrue(
s.find("from s in class Simple where lower( s.name || ' foo' ) ='simple 1 foo'").size()==1
);
}
! if ( (dialect instanceof SybaseDialect)) {
assertTrue(
s.find("from s in class Simple where lower( s.name + ' foo' ) ='simple 1 foo'").size()==1
);
! }
Simple other = new Simple();
--- 40,53 ----
s.find("from s in class Simple where not( upper( s.name ) ='yada' or 1=2 or 'foo'='bar' or not('foo'='foo') or 'foo' like 'bar' )").size()==1
);
! if ( !(dialect instanceof MySQLDialect) && !(dialect instanceof SybaseDialect) && !(dialect instanceof InterbaseDialect) ) { //My SQL has a funny concatenation operator
assertTrue(
s.find("from s in class Simple where lower( s.name || ' foo' ) ='simple 1 foo'").size()==1
);
}
! if ( (dialect instanceof SybaseDialect) ) {
assertTrue(
s.find("from s in class Simple where lower( s.name + ' foo' ) ='simple 1 foo'").size()==1
);
! }
Simple other = new Simple();
***************
*** 57,61 ****
//s.find("from s in class Simple where s.name ## 'cat|rat|bag'");
assertTrue(
! s.find("from s in class Simple where lower( s.other.name ) ='simple 2'").size()==1
);
assertTrue(
--- 58,65 ----
//s.find("from s in class Simple where s.name ## 'cat|rat|bag'");
assertTrue(
! s.find("from s in class Simple where upper( s.other.name ) ='SIMPLE 2'").size()==1
! );
! assertTrue(
! s.find("from s in class Simple where not ( upper( s.other.name ) ='SIMPLE 2' )").size()==0
);
assertTrue(
Index: SingleSeveral.hbm.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/SingleSeveral.hbm.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SingleSeveral.hbm.xml 7 Nov 2002 10:12:15 -0000 1.1
--- SingleSeveral.hbm.xml 20 Nov 2002 14:20:10 -0000 1.2
***************
*** 7,12 ****
<class name="cirrus.hibernate.test.Single">
<composite-id>
! <key-property name="id"/>
! <key-property name="string"/>
</composite-id>
<property name="prop"/>
--- 7,12 ----
<class name="cirrus.hibernate.test.Single">
<composite-id>
! <key-property name="id" length="32"/>
! <key-property name="string" length="32"/>
</composite-id>
<property name="prop"/>
***************
*** 22,31 ****
<class name="cirrus.hibernate.test.Several">
<composite-id>
! <key-property name="id"/>
! <key-property name="string"/>
</composite-id>
<many-to-one name="single">
! <column name="single_id"/>
! <column name="single_string"/>
</many-to-one>
</class>
--- 22,31 ----
<class name="cirrus.hibernate.test.Several">
<composite-id>
! <key-property name="id" length="32"/>
! <key-property name="string" length="32"/>
</composite-id>
<many-to-one name="single">
! <column name="single_id" length="32"/>
! <column name="single_string" length="32"/>
</many-to-one>
</class>
Index: Stuff.hbm.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/Stuff.hbm.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Stuff.hbm.xml 7 Nov 2002 11:33:49 -0000 1.5
--- Stuff.hbm.xml 20 Nov 2002 14:20:10 -0000 1.6
***************
*** 6,10 ****
<composite-id>
<key-property name="intId"/>
! <key-property name="stringId"/>
</composite-id>
<property name="name"/>
--- 6,10 ----
<composite-id>
<key-property name="intId"/>
! <key-property name="stringId" length="32"/>
</composite-id>
<property name="name"/>
***************
*** 13,17 ****
<!--unfortunately have to specify not-null here because of limitation in schema export....-->
<column name="moreInt" not-null="true"/>
! <column name="moreString" not-null="true"/>
</key>
<one-to-many class="cirrus.hibernate.test.Stuff"/>
--- 13,17 ----
<!--unfortunately have to specify not-null here because of limitation in schema export....-->
<column name="moreInt" not-null="true"/>
! <column name="moreString" not-null="true" length="32"/>
</key>
<one-to-many class="cirrus.hibernate.test.Stuff"/>
***************
*** 25,29 ****
<key-many-to-one name="moreStuff" class="cirrus.hibernate.test.MoreStuff">
<column name="moreInt"/>
! <column name="moreString"/>
</key-many-to-one>
</composite-id>
--- 25,29 ----
<key-many-to-one name="moreStuff" class="cirrus.hibernate.test.MoreStuff">
<column name="moreInt"/>
! <column name="moreString" length="32"/>
</key-many-to-one>
</composite-id>
|