Methods Summary |
---|
public void | configure(org.hibernate.cfg.Configuration cfg)
cfg.setProperty( Environment.USE_SECOND_LEVEL_CACHE, "false");
cfg.setProperty(Environment.GENERATE_STATISTICS, "true");
|
public java.lang.String[] | getMappings()
return new String[] { "onetoone/optional/Person.hbm.xml" };
|
public static junit.framework.Test | suite()
return new FunctionalTestClassTestSuite( OptionalOneToOneTest.class );
|
public void | testOptionalOneToOneRetrieval()
Session s = openSession();
s.beginTransaction();
Person me = new Person();
me.name = "Steve";
s.save( me );
s.getTransaction().commit();
s.close();
s = openSession();
s.beginTransaction();
me = ( Person ) s.load( Person.class, me.name );
assertNull( me.address );
s.delete( me );
s.getTransaction().commit();
s.close();
|