mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-08 12:14:47 +00:00
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 @@
|
|||||||
*/
|
*/
|
||||||
@Jpa(
|
@Jpa(
|
||||||
annotatedClasses = {
|
annotatedClasses = {
|
||||||
ManyToOneWithAnyAndSameEntityTest.Actor.class,
|
ManyToOneWithAnyAndSecondaryTable.Actor.class,
|
||||||
ManyToOneWithAnyAndSameEntityTest.Contact.class
|
ManyToOneWithAnyAndSecondaryTable.Contact.class
|
||||||
},
|
},
|
||||||
integrationSettings = @Setting(name = JdbcSettings.SHOW_SQL, value = "true")
|
integrationSettings = @Setting(name = JdbcSettings.SHOW_SQL, value = "true")
|
||||||
)
|
)
|
||||||
@JiraKey("HHH-18750")
|
@JiraKey("HHH-18750")
|
||||||
class ManyToOneWithAnyAndSameEntityTest {
|
class ManyToOneWithAnyAndSecondaryTable {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testMappingManyToOneMappedByAnyPersistedInSecondaryTable(EntityManagerFactoryScope scope) {
|
void testMappingManyToOneMappedByAnyPersistedInSecondaryTable(EntityManagerFactoryScope scope) {
|
Loading…
x
Reference in New Issue
Block a user