FileDocCategorySizeDatePackage
AnyTypeTest.javaAPI DocHibernate 3.2.51545Tue Dec 12 16:22:26 GMT 2006org.hibernate.test.any

AnyTypeTest

public class AnyTypeTest extends org.hibernate.junit.functional.FunctionalTestCase
todo: describe AnyTypeTest
author
Steve Ebersole

Fields Summary
Constructors Summary
public AnyTypeTest(String name)

		super( name );
	
Methods Summary
public java.lang.StringgetCacheConcurrencyStrategy()

		// having second level cache causes a condition whereby the original test case would not fail...
		return null;
	
public java.lang.String[]getMappings()

		return new String[] { "any/Person.hbm.xml" };
	
public static junit.framework.Testsuite()

		return new FunctionalTestClassTestSuite( AnyTypeTest.class );
	
public voidtestFlushProcessing()
Specific test for HHH-1663...

		Session session = openSession();
		session.beginTransaction();
		Person person = new Person();
		Address address = new Address();
		person.setData( address );
		session.saveOrUpdate(person);
		session.saveOrUpdate(address);
		session.getTransaction().commit();
		session.close();

		session = openSession();
		session.beginTransaction();
        person = (Person) session.load( Person.class, person.getId() );
        person.setName("makingpersondirty");
		session.getTransaction().commit();
		session.close();

		session = openSession();
		session.beginTransaction();
		session.delete( person );
		session.getTransaction().commit();
		session.close();