diff --git a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/hhh17613/ChildB.java b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/hhh17613/ChildB.java
new file mode 100644
index 0000000000..bb7ef6f411
--- /dev/null
+++ b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/hhh17613/ChildB.java
@@ -0,0 +1,7 @@
+package org.hibernate.jpamodelgen.test.hhh17613;
+
+import jakarta.persistence.MappedSuperclass;
+
+@MappedSuperclass
+public abstract class ChildB extends Parent {
+}
diff --git a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/hhh17613/HHH17613Test.java b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/hhh17613/HHH17613Test.java
new file mode 100644
index 0000000000..36c004369e
--- /dev/null
+++ b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/hhh17613/HHH17613Test.java
@@ -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 ) );
+ }
+}
diff --git a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/hhh17613/Parent.java b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/hhh17613/Parent.java
new file mode 100644
index 0000000000..2f04d9b48c
--- /dev/null
+++ b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/hhh17613/Parent.java
@@ -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;
+}
diff --git a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/hhh17613/a/ChildA.java b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/hhh17613/a/ChildA.java
new file mode 100644
index 0000000000..bbea629e48
--- /dev/null
+++ b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/hhh17613/a/ChildA.java
@@ -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> extends Parent {
+
+ @OneToMany
+ private Set bs = new HashSet<>();
+
+}