Skip to content

Commit 336b548

Browse files
committed
HHH-10068 - Missing generated JPA static metamodel class for envers revision entity
(cherry picked from commit 518033e)
1 parent 9d2b106 commit 336b548

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

hibernate-envers/hibernate-envers.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ dependencies {
1212

1313
provided( [group: 'org.hibernate', name: 'hibernate-tools', version: '3.2.0.ga'] )
1414
provided( libraries.ant )
15+
provided( project( ':hibernate-jpamodelgen' ) )
1516

1617
testCompile( project(':hibernate-testing') )
1718
testCompile( project(path: ':hibernate-entitymanager', configuration: 'tests') )
@@ -22,7 +23,6 @@ dependencies {
2223
mavenPom {
2324
name = 'ENtity VERSioning support'
2425
description = 'ENtity VERSioning support'
25-
2626
}
2727

2828
def osgiDescription() {
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Hibernate, Relational Persistence for Idiomatic Java
3+
*
4+
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
5+
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
6+
*/
7+
package org.hibernate.envers.test;
8+
9+
import org.hibernate.envers.DefaultRevisionEntity_;
10+
import org.hibernate.envers.DefaultTrackingModifiedEntitiesRevisionEntity_;
11+
import org.hibernate.envers.enhanced.SequenceIdRevisionEntity_;
12+
import org.hibernate.envers.enhanced.SequenceIdTrackingModifiedEntitiesRevisionEntity_;
13+
14+
import org.hibernate.testing.junit4.BaseUnitTestCase;
15+
import org.junit.Test;
16+
17+
import static org.junit.Assert.assertNotNull;
18+
19+
/**
20+
* Just a test to make sure that the generated "JPA static metamodel" classes continue to be generated.
21+
*
22+
* @author Steve Ebersole
23+
*/
24+
public class JpaStaticMetamodelTest extends BaseUnitTestCase {
25+
@Test
26+
public void testStaticMetamodelGenerationHappened() {
27+
// Really in a regression scenario, this class wont even compile...
28+
assertNotNull( DefaultRevisionEntity_.class );
29+
assertNotNull( DefaultTrackingModifiedEntitiesRevisionEntity_.class );
30+
assertNotNull( SequenceIdRevisionEntity_.class );
31+
assertNotNull( SequenceIdTrackingModifiedEntitiesRevisionEntity_.class );
32+
}
33+
}

0 commit comments

Comments
 (0)