From: <one...@us...> - 2003-04-04 13:58:22
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/test In directory sc8-pr-cvs1:/tmp/cvs-serv11567/test Modified Files: FooBarTest.java Log Message: fixed problem with proxy.getId() for an interface proxy Index: FooBarTest.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/FooBarTest.java,v retrieving revision 1.242 retrieving revision 1.243 diff -C2 -d -r1.242 -r1.243 *** FooBarTest.java 13 Mar 2003 02:52:20 -0000 1.242 --- FooBarTest.java 4 Apr 2003 13:58:16 -0000 1.243 *************** *** 6,9 **** --- 6,11 ---- import cirrus.hibernate.connection.ConnectionProvider; import cirrus.hibernate.connection.DriverManagerConnectionProvider; + import cirrus.hibernate.proxy.HibernateProxy; + import cirrus.hibernate.proxy.HibernateProxyHelper; import cirrus.hibernate.sql.DB2Dialect; import cirrus.hibernate.sql.HSQLDialect; *************** *** 569,572 **** --- 571,578 ---- q = (Qux) s.load(Qux.class, q.getKey() ); b = (BarProxy) s.load( Foo.class, b.getKey() ); + b.getKey(); + assertTrue( HibernateProxyHelper.getLazyInitializer( (HibernateProxy) b ).isUninitialized() ); + b.getBarString(); + assertFalse( HibernateProxyHelper.getLazyInitializer( (HibernateProxy) b ).isUninitialized() ); BarProxy b2 = (BarProxy) s.load( Bar.class, new String( b.getKey() ) ); Qux q2 = (Qux) s.load( Qux.class, q.getKey() ); |