/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.test.annotations.type;
import org.junit.Test;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import static org.junit.Assert.assertNotNull;
/**
* @author Emmanuel Bernard
*/
public class TypeTest extends BaseCoreFunctionalTestCase {
@Test
public void testIdWithMulticolumns() throws Exception {
Session s;
Transaction tx;
s = openSession();
tx = s.beginTransaction();
Dvd lesOiseaux = new Dvd();
lesOiseaux.setTitle( "Les oiseaux" );
s.persist( lesOiseaux );
s.flush();
assertNotNull( lesOiseaux.getId() );
tx.rollback();
s.close();
}
@Override
protected Class[] getAnnotatedClasses() {
return new Class[]{
Dvd.class
};
}
}