Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test
In directory sc8-pr-cvs1:/tmp/cvs-serv16387/hibernate/test
Modified Files:
Baz.hbm.xml FooBarTest.java
Log Message:
* code cleanups
* collection where attribute now used for collection removal
Index: Baz.hbm.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/Baz.hbm.xml,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** Baz.hbm.xml 5 Apr 2003 07:13:38 -0000 1.17
--- Baz.hbm.xml 18 Apr 2003 05:09:51 -0000 1.18
***************
*** 179,183 ****
</map>
! <map name="stringGlarchMap" where="baz_map_index > 'a' and tha_key is not null" cascade="all">
<key column="baz_map_id"/>
<index column="baz_map_index" type="string"/>
--- 179,183 ----
</map>
! <map name="stringGlarchMap" where="baz_map_index > 'a' and tha_key is not null" cascade="all">
<key column="baz_map_id"/>
<index column="baz_map_index" type="string"/>
Index: FooBarTest.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/FooBarTest.java,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -d -r1.55 -r1.56
*** FooBarTest.java 17 Apr 2003 08:09:13 -0000 1.55
--- FooBarTest.java 18 Apr 2003 05:09:51 -0000 1.56
***************
*** 352,355 ****
--- 352,359 ----
s.delete("from Foo foo");
s.delete(baz);
+ int rows=s.connection().createStatement().executeUpdate(
+ "delete from fooArray where id_='" + baz.getCode() + "' and i>=8"
+ );
+ assertTrue(rows==1);
s.flush();
s.connection().commit();
***************
*** 808,811 ****
--- 812,817 ----
s.delete( baz.getTopGlarchez().get( new Character('G') ) );
s.delete( baz.getTopGlarchez().get( new Character('H') ) );
+ int rows = s.connection().createStatement().executeUpdate("update glarchez set baz_map_id=null where baz_map_index='a'");
+ assertTrue(rows==1);
assertTrue( s.delete("from bar in class net.sf.hibernate.test.Bar")==1 );
FooProxy[] arr = baz.getFooArray();
|