HHH-18750 : @OneToMany with @Any mapped in secondary table KO (ClassCastException)
He mistakenly assumes, at first glance, that the mappedBy attribut is not a @ManyToOne or @Any because the mappedBy attribut is mapped in a secondary table and therefore has a join. The problem appears later during a cast where the instance of type DiscriminatedAssociationAttributeMapping is cast to PluralAttributeMapping. https://hibernate.atlassian.net/browse/HHH-18750
This commit is contained in:
parent
4556995616
commit
82a76ac9aa
|
@ -38,13 +38,13 @@ import static jakarta.persistence.FetchType.LAZY;
|
|||
*/
|
||||
@Jpa(
|
||||
annotatedClasses = {
|
||||
ManyToOneWithAnyAndSameEntityTest.Actor.class,
|
||||
ManyToOneWithAnyAndSameEntityTest.Contact.class
|
||||
ManyToOneWithAnyAndSecondaryTable.Actor.class,
|
||||
ManyToOneWithAnyAndSecondaryTable.Contact.class
|
||||
},
|
||||
integrationSettings = @Setting(name = JdbcSettings.SHOW_SQL, value = "true")
|
||||
)
|
||||
@JiraKey("HHH-18750")
|
||||
class ManyToOneWithAnyAndSameEntityTest {
|
||||
class ManyToOneWithAnyAndSecondaryTable {
|
||||
|
||||
@Test
|
||||
void testMappingManyToOneMappedByAnyPersistedInSecondaryTable(EntityManagerFactoryScope scope) {
|
Loading…
Reference in New Issue