Added regression test for HHH-8769
This commit is contained in:
parent
ff2b0fbb29
commit
8d3d259963
|
@ -0,0 +1,33 @@
|
|||
package org.hibernate.envers.test.integration.dynamicmodel;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
|
||||
import org.hibernate.envers.test.BaseEnversJPAFunctionalTestCase;
|
||||
import org.hibernate.testing.FailureExpected;
|
||||
import org.hibernate.testing.TestForIssue;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* @author Felix Feisst (feisst dot felix at gmail dot com)
|
||||
*/
|
||||
@TestForIssue(jiraKey = "HHH-8769")
|
||||
public class DynamicModelTest extends BaseEnversJPAFunctionalTestCase {
|
||||
|
||||
@Override
|
||||
protected String[] getMappings() {
|
||||
return new String[] { "mappings/dynamicmodel/dynamicModel.hbm.xml" };
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests that an EntityManager can be created when using a dynamic model mapping.
|
||||
*/
|
||||
@Test
|
||||
@FailureExpected(jiraKey = "HHH-8769")
|
||||
public void testDynamicModelMapping() {
|
||||
EntityManager entityManager = getOrCreateEntityManager();
|
||||
assertNotNull( "Expected an entity manager to be returned", entityManager );
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="WINDOWS-1251"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
|
||||
<hibernate-mapping>
|
||||
|
||||
<!-- no name attribute is specified for dynamic models -->
|
||||
<class
|
||||
entity-name="DynamicModelEntity" table="dynamic_model_entity"
|
||||
abstract="true" >
|
||||
<id name="id" column="ID" type="long">
|
||||
<generator class="increment" />
|
||||
</id>
|
||||
</class>
|
||||
|
||||
</hibernate-mapping>
|
Loading…
Reference in New Issue