From: <one...@us...> - 2003-03-13 03:16:21
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test In directory sc8-pr-cvs1:/tmp/cvs-serv27048/sf/hibernate/test Modified Files: FooBarTest.java Log Message: improved handing of proxies in QueryImpl don't initialize proxies in update() or saveOrUpdate() added Session.refresh(Object, LockMode) Index: FooBarTest.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/FooBarTest.java,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** FooBarTest.java 12 Mar 2003 08:24:24 -0000 1.41 --- FooBarTest.java 13 Mar 2003 03:16:02 -0000 1.42 *************** *** 59,62 **** --- 59,83 ---- } + public void testEmptyCollection() throws Exception { + Session s = sessions.openSession(); + Serializable id = s.save( new Baz() ); + s.flush(); + s.connection().commit(); + s.close(); + s = sessions.openSession(); + Baz baz = (Baz) s.load(Baz.class, id); + Set foos = baz.getFooSet(); + assertTrue( foos.size()==0 ); + Foo foo = new Foo(); + foos.add(foo); + s.save(foo); + s.flush(); + s.delete(foo); + s.delete(baz); + s.flush(); + s.connection().commit(); + s.close(); + } + public void testNamedParams() throws Exception { Bar bar = new Bar(); |