HHH-17613 - Test case demonstrating the problem
This commit is contained in:
parent
d29cb697f9
commit
23f5b45b5c
|
@ -0,0 +1,7 @@
|
|||
package org.hibernate.jpamodelgen.test.hhh17613;
|
||||
|
||||
import jakarta.persistence.MappedSuperclass;
|
||||
|
||||
@MappedSuperclass
|
||||
public abstract class ChildB<A> extends Parent {
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package org.hibernate.jpamodelgen.test.hhh17613;
|
||||
|
||||
import org.hibernate.jpamodelgen.test.hhh17613.a.ChildA;
|
||||
import org.hibernate.jpamodelgen.test.util.CompilationTest;
|
||||
import org.hibernate.jpamodelgen.test.util.TestForIssue;
|
||||
import org.hibernate.jpamodelgen.test.util.TestUtil;
|
||||
import org.hibernate.jpamodelgen.test.util.WithClasses;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@TestForIssue(jiraKey = " HHH-17613")
|
||||
public class HHH17613Test extends CompilationTest {
|
||||
|
||||
@Test
|
||||
@WithClasses({ ChildA.class, ChildB.class, Parent.class })
|
||||
@TestForIssue(jiraKey = " HHH-17613")
|
||||
public void test() {
|
||||
System.out.println( TestUtil.getMetaModelSourceAsString( ChildA.class ) );
|
||||
System.out.println( TestUtil.getMetaModelSourceAsString( ChildB.class ) );
|
||||
System.out.println( TestUtil.getMetaModelSourceAsString( Parent.class ) );
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package org.hibernate.jpamodelgen.test.hhh17613;
|
||||
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.MappedSuperclass;
|
||||
|
||||
@MappedSuperclass
|
||||
public abstract class Parent {
|
||||
|
||||
@Id
|
||||
private Long id;
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package org.hibernate.jpamodelgen.test.hhh17613.a;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.hibernate.jpamodelgen.test.hhh17613.ChildB;
|
||||
import org.hibernate.jpamodelgen.test.hhh17613.Parent;
|
||||
|
||||
import jakarta.persistence.MappedSuperclass;
|
||||
import jakarta.persistence.OneToMany;
|
||||
|
||||
@MappedSuperclass
|
||||
public abstract class ChildA<A extends Parent, B extends ChildB<A>> extends Parent {
|
||||
|
||||
@OneToMany
|
||||
private Set<B> bs = new HashSet<>();
|
||||
|
||||
}
|
Loading…
Reference in New Issue