HHH-10981 - Test case
This commit is contained in:
parent
5d6678a414
commit
63af953566
|
@ -158,6 +158,13 @@ public class EnhancerTest extends BaseUnitTestCase {
|
|||
@TestForIssue( jiraKey = "HHH-10646" )
|
||||
public void testMappedSuperclass() {
|
||||
EnhancerTestUtils.runEnhancerTestTask( MappedSuperclassTestTask.class );
|
||||
EnhancerTestUtils.runEnhancerTestTask( MappedSuperclassTestTask.class, new EnhancerTestContext() {
|
||||
@Override
|
||||
public boolean hasLazyLoadableAttributes(CtClass classDescriptor) {
|
||||
// HHH-10981 - Without lazy loading, the generation of getters and setters has a different code path
|
||||
return false;
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -28,7 +28,7 @@ public class MappedSuperclassTestTask extends AbstractEnhancerTestTask {
|
|||
|
||||
public void execute() {
|
||||
Employee charles = new Employee( "Charles", "Engineer" );
|
||||
charles.oca = 1002;
|
||||
charles.setOca( 1002 );
|
||||
|
||||
// Check that both types of class attributes are being dirty tracked
|
||||
EnhancerTestUtils.checkDirtyTracking( charles, "title", "oca" );
|
||||
|
@ -46,9 +46,9 @@ public class MappedSuperclassTestTask extends AbstractEnhancerTestTask {
|
|||
|
||||
@MappedSuperclass private static class Person {
|
||||
|
||||
@Id String name;
|
||||
@Id private String name;
|
||||
|
||||
@Version long oca;
|
||||
@Version private long oca;
|
||||
|
||||
public Person(String name) {
|
||||
this();
|
||||
|
|
Loading…
Reference in New Issue