|
From: <one...@us...> - 2003-01-02 11:01:53
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test
In directory sc8-pr-cvs1:/tmp/cvs-serv30125/src/net/sf/hibernate/test
Modified Files:
Baz.hbm.xml FooBarTest.java
Log Message:
changed default unsaved-value
changed 'role' attribute to 'name'
added a new check/exception in delete()
Index: Baz.hbm.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/Baz.hbm.xml,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** Baz.hbm.xml 1 Jan 2003 13:56:46 -0000 1.1.1.1
--- Baz.hbm.xml 2 Jan 2003 11:01:49 -0000 1.2
***************
*** 11,15 ****
<property name="name" column="name_b"/>
! <list role="stringList" table="string_list">
<key>
<column name="id" length="16"/>
--- 11,15 ----
<property name="name" column="name_b"/>
! <list name="stringList" table="string_list">
<key>
<column name="id" length="16"/>
***************
*** 18,22 ****
<element column="element" type="string"/>
</list>
! <primitive-array role="intArray" table="int_array">
<key>
<column name="id" length="16"/>
--- 18,22 ----
<element column="element" type="string"/>
</list>
! <primitive-array name="intArray" table="int_array">
<key>
<column name="id" length="16"/>
***************
*** 25,29 ****
<element column="j" type="int"/>
</primitive-array>
! <set role="fooSet" lazy="true" order-by="string_">
<key>
<column name="baz_id" length="16"/>
--- 25,29 ----
<element column="j" type="int"/>
</primitive-array>
! <set name="fooSet" lazy="true" order-by="string_">
<key>
<column name="baz_id" length="16"/>
***************
*** 31,35 ****
<one-to-many class="net.sf.hibernate.test.Foo"/>
</set>
! <array role="components" table="bazcomponents">
<key>
<column name="baz_id" length="16"/>
--- 31,35 ----
<one-to-many class="net.sf.hibernate.test.Foo"/>
</set>
! <array name="components" table="bazcomponents">
<key>
<column name="baz_id" length="16"/>
***************
*** 47,51 ****
</composite-element>
</array>
! <array role="timeArray">
<key>
<column name="baz_id" length="16"/>
--- 47,51 ----
</composite-element>
</array>
! <array name="timeArray">
<key>
<column name="baz_id" length="16"/>
***************
*** 54,58 ****
<element column="the_time" type="time"/>
</array>
! <bag role="bag" order-by="name">
<key>
<column name="baz_id" length="16"/>
--- 54,58 ----
<element column="the_time" type="time"/>
</array>
! <bag name="bag" order-by="name">
<key>
<column name="baz_id" length="16"/>
***************
*** 60,64 ****
<element column="name" type="string"/>
</bag>
! <map role="fooToGlarch">
<key>
<column name="baz_id" length="16"/>
--- 60,64 ----
<element column="name" type="string"/>
</bag>
! <map name="fooToGlarch">
<key>
<column name="baz_id" length="16"/>
***************
*** 67,71 ****
<many-to-many column="glarch_id" class="net.sf.hibernate.test.Glarch"/>
</map>
! <map role="fooComponentToFoo">
<key>
<column name="baz_id" length="16"/>
--- 67,71 ----
<many-to-many column="glarch_id" class="net.sf.hibernate.test.Glarch"/>
</map>
! <map name="fooComponentToFoo">
<key>
<column name="baz_id" length="16"/>
***************
*** 77,81 ****
<many-to-many column="foo_id" class="net.sf.hibernate.test.Foo"/>
</map>
! <map role="glarchToFoo">
<key>
<column name="gtf_baz_id" length="16"/>
--- 77,81 ----
<many-to-many column="foo_id" class="net.sf.hibernate.test.Foo"/>
</map>
! <map name="glarchToFoo">
<key>
<column name="gtf_baz_id" length="16"/>
***************
*** 85,89 ****
</map>
! <set role="stringSet" lazy="true" sort="natural">
<!--<jcs-cache usage="read-write"/>-->
<key column="id_" />
--- 85,89 ----
</map>
! <set name="stringSet" lazy="true" sort="natural">
<!--<jcs-cache usage="read-write"/>-->
<key column="id_" />
***************
*** 91,95 ****
</set>
! <map role="stringDateMap" lazy="true" sort="net.sf.hibernate.test.ReverseComparator">
<key column="id_" />
<index column="map_key" type="string" length="32"/>
--- 91,95 ----
</set>
! <map name="stringDateMap" lazy="true" sort="net.sf.hibernate.test.ReverseComparator">
<key column="id_" />
<index column="map_key" type="string" length="32"/>
***************
*** 97,101 ****
</map>
! <array role="fooArray" element-class="net.sf.hibernate.test.FooProxy">
<!--<jcs-cache usage="read-write"/>-->
<key column="id_" />
--- 97,101 ----
</map>
! <array name="fooArray" element-class="net.sf.hibernate.test.FooProxy">
<!--<jcs-cache usage="read-write"/>-->
<key column="id_" />
***************
*** 106,110 ****
</array>
! <array role="stringArray">
<key column="id_" />
<index column="i"/>
--- 106,110 ----
</array>
! <array name="stringArray">
<key column="id_" />
<index column="i"/>
***************
*** 112,116 ****
</array>
! <list role="customs">
<key column="id_"/>
<index column="indx"/>
--- 112,116 ----
</array>
! <list name="customs">
<key column="id_"/>
<index column="indx"/>
***************
*** 121,125 ****
</list>
! <list role="topComponents" table="topcomponents">
<!--<jcs-cache usage="read-write"/>-->
<key column="id_"/>
--- 121,125 ----
</list>
! <list name="topComponents" table="topcomponents">
<!--<jcs-cache usage="read-write"/>-->
<key column="id_"/>
***************
*** 131,145 ****
</list>
! <set role="topFoos">
<key column="idtopbar" />
<one-to-many class = "net.sf.hibernate.test.Bar"/>
</set>
! <set role="cascadingBars" cascade="all">
<key column="idtopbar" />
<one-to-many class = "net.sf.hibernate.test.Bar"/>
</set>
! <map role="topGlarchez">
<key column="idtopglarch" />
<index column="mapkey" type="character"/>
--- 131,145 ----
</list>
! <set name="topFoos">
<key column="idtopbar" />
<one-to-many class = "net.sf.hibernate.test.Bar"/>
</set>
! <set name="cascadingBars" cascade="all">
<key column="idtopbar" />
<one-to-many class = "net.sf.hibernate.test.Bar"/>
</set>
! <map name="topGlarchez">
<key column="idtopglarch" />
<index column="mapkey" type="character"/>
Index: FooBarTest.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/FooBarTest.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** FooBarTest.java 1 Jan 2003 13:57:03 -0000 1.1.1.1
--- FooBarTest.java 2 Jan 2003 11:01:49 -0000 1.2
***************
*** 101,105 ****
assertTrue( stuff.getProperty().equals( TimeZone.getDefault() ) );
assertTrue( stuff.getMoreStuff().getName().equals("More Stuff") );
! s.delete( stuff.getMoreStuff() );
s.delete("from foo in class Foo");
t.commit();
--- 101,105 ----
assertTrue( stuff.getProperty().equals( TimeZone.getDefault() ) );
assertTrue( stuff.getMoreStuff().getName().equals("More Stuff") );
! s.delete("from ms in class MoreStuff");
s.delete("from foo in class Foo");
t.commit();
***************
*** 523,527 ****
baz.getOnes().remove(o);
s.delete("from o in class net.sf.hibernate.test.One");
! s.delete(h);
s.flush();
s.connection().commit();
--- 523,527 ----
baz.getOnes().remove(o);
s.delete("from o in class net.sf.hibernate.test.One");
! s.delete(baz);
s.flush();
s.connection().commit();
|