Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/test
In directory sc8-pr-cvs1:/tmp/cvs-serv9038/hibernate/test
Modified Files:
Container.hbm.xml ParentChildTest.java SQLFunctionsTest.java
Log Message:
added cascade to PostgreSQL drop table
applied Max Andersen exception message patch
applied J Russel Smyth patch to allow setMaxResults() to sort of work on SAPDB
fixed a bug where readonly bags did not always cascade save-update
Index: Container.hbm.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/Container.hbm.xml,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** Container.hbm.xml 7 Dec 2002 09:41:22 -0000 1.11
--- Container.hbm.xml 24 Dec 2002 13:45:38 -0000 1.12
***************
*** 41,45 ****
<many-to-many column="contained_id" class="cirrus.hibernate.test.Contained" outer-join="true"/>
</bag>
! <bag role="lazyBag" readonly="true" lazy="true" table="LCCBAG">
<key column="container_id"/>
<many-to-many column="contained_id" class="cirrus.hibernate.test.Contained"/>
--- 41,45 ----
<many-to-many column="contained_id" class="cirrus.hibernate.test.Contained" outer-join="true"/>
</bag>
! <bag role="lazyBag" readonly="true" lazy="true" table="LCCBAG" cascade="save-update">
<key column="container_id"/>
<many-to-many column="contained_id" class="cirrus.hibernate.test.Contained"/>
Index: ParentChildTest.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/ParentChildTest.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** ParentChildTest.java 14 Dec 2002 08:54:42 -0000 1.33
--- ParentChildTest.java 24 Dec 2002 13:45:38 -0000 1.34
***************
*** 352,357 ****
c = (Container) s.find("from c in class Container").get(0);
Contained c3 = new Contained();
! c.getBag().add(c3);
! c3.getBag().add(c);
c.getLazyBag().add(c3);
c3.getLazyBag().add(c);
--- 352,357 ----
c = (Container) s.find("from c in class Container").get(0);
Contained c3 = new Contained();
! //c.getBag().add(c3);
! //c3.getBag().add(c);
c.getLazyBag().add(c3);
c3.getLazyBag().add(c);
***************
*** 365,370 ****
c.getLazyBag().add(c4);
c4.getLazyBag().add(c);
! assertTrue( c.getLazyBag().size()==3 );
! s.save(c4);
t.commit();
s.close();
--- 365,370 ----
c.getLazyBag().add(c4);
c4.getLazyBag().add(c);
! assertTrue( c.getLazyBag().size()==3 ); //forces initialization
! //s.save(c4);
t.commit();
s.close();
***************
*** 379,383 ****
j++;
}
! assertTrue(j==4);
assertTrue( c.getLazyBag().size()==3 );
s.delete(c);
--- 379,383 ----
j++;
}
! assertTrue(j==3);
assertTrue( c.getLazyBag().size()==3 );
s.delete(c);
***************
*** 389,394 ****
s.delete( iter.next() );
}
! assertTrue(j==3);
s.delete( s.load(Contained.class, new Long( c4.getId() ) ) );
t.commit();
s.close();
--- 389,395 ----
s.delete( iter.next() );
}
! assertTrue(j==2);
s.delete( s.load(Contained.class, new Long( c4.getId() ) ) );
+ s.delete( s.load(Contained.class, new Long( c3.getId() ) ) );
t.commit();
s.close();
Index: SQLFunctionsTest.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/SQLFunctionsTest.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** SQLFunctionsTest.java 20 Nov 2002 14:20:10 -0000 1.33
--- SQLFunctionsTest.java 24 Dec 2002 13:45:38 -0000 1.34
***************
*** 102,106 ****
q = s.createQuery("from s in class Simple");
q.setMaxResults(1);
- if ( ! (dialect instanceof SAPDBDialect ) ) assertTrue( q.list().size()==1 ); // setMaxRows broken in SAP JDBC driver
q = s.createQuery("from s in class Simple where s.name = ?");
q.setString(0, "Simple 1");
--- 102,105 ----
|