FileDocCategorySizeDatePackage
AbstractCompositeIdTest.javaAPI DocHibernate 3.2.51145Tue Dec 12 16:22:26 GMT 2006org.hibernate.test.abstractembeddedcomponents.cid

AbstractCompositeIdTest

public class AbstractCompositeIdTest extends org.hibernate.junit.functional.FunctionalTestCase
author
Steve Ebersole

Fields Summary
Constructors Summary
public AbstractCompositeIdTest(String x)

		super( x );
	
Methods Summary
public java.lang.String[]getMappings()

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

		return new FunctionalTestClassTestSuite( AbstractCompositeIdTest.class );
	
public voidtestEmbeddedCompositeIdentifierOnAbstractClass()

		MyInterfaceImpl myInterface = new MyInterfaceImpl();
		myInterface.setKey1( "key1" );
		myInterface.setKey2( "key2" );
		myInterface.setName( "test" );

		Session s = openSession();
		Transaction t = s.beginTransaction();
		s.save( myInterface );
		s.flush();

		s.createQuery( "from MyInterface" ).list();

		s.delete( myInterface );
		t.commit();
		s.close();