HHH-16616 Fix test with assertion that requires multiple subtypes
This commit is contained in:
parent
b7ba6e731e
commit
ca92becf8e
|
@ -44,7 +44,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
@DomainModel(annotatedClasses = {
|
||||
OneToManyJoinFetchDiscriminatorTest.Person.class,
|
||||
OneToManyJoinFetchDiscriminatorTest.BodyPart.class,
|
||||
OneToManyJoinFetchDiscriminatorTest.Leg.class
|
||||
OneToManyJoinFetchDiscriminatorTest.Leg.class,
|
||||
OneToManyJoinFetchDiscriminatorTest.Arm.class,
|
||||
})
|
||||
@JiraKey("HHH-16157")
|
||||
public class OneToManyJoinFetchDiscriminatorTest {
|
||||
|
@ -136,4 +137,23 @@ public class OneToManyJoinFetchDiscriminatorTest {
|
|||
return person;
|
||||
}
|
||||
}
|
||||
|
||||
@Entity(name = "Arm")
|
||||
@DiscriminatorValue("ArmBodyPart")
|
||||
public static class Arm extends BodyPart {
|
||||
@ManyToOne(fetch = FetchType.LAZY, optional = false)
|
||||
private Person person;
|
||||
|
||||
public Arm() {
|
||||
}
|
||||
|
||||
public Arm(String name, Person person) {
|
||||
this.name = name;
|
||||
this.person = person;
|
||||
}
|
||||
|
||||
public Person getPerson() {
|
||||
return person;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue