Broken column mapping after upgrading 5.6 to 6.2

I’m currently during Hibernate upgrade from 5.6 to 6.2.
After upgrade below code stopped working. I cannot find anything wrong with my code

@Table(name = "order_linkage")
class OrderLink(
        var linkId: OrderLinkId? = null,

        var creationTime: Timestamp? = null,

        var primaryOrder: OrderEntity? = null,

        var secondaryOrder: OrderEntity? = null

class OrderLinkId(
        @Column(name = "primary_order_id")
        var primaryOrderId: Long? = null,

        @Column(name = "secondary_order_id")
        var secondaryOrderId: Long? = null
) : Serializable

@Table(name = "order_entity")
@DiscriminatorColumn(name = "type")
@Inheritance(strategy = InheritanceType.JOINED)
abstract class OrderEntity(
...some fields

@OneToOne(mappedBy = "secondaryOrder", cascade = [CascadeType.ALL])
var primaryLink: OrderLink? = null,

@OneToMany(mappedBy = "primaryOrder", cascade = [CascadeType.ALL])
var secondaryLinks: MutableList<OrderLink>? = null

Error I’m getting is:

MappingException: broken column mapping for: of: OrderEntityExtended

Looks like a bug. Please try to create a reproducer with our test case template (hibernate-test-case-templates/orm/hibernate-orm-6/src/test/java/org/hibernate/bugs/ at main · hibernate/hibernate-test-case-templates · GitHub) and if you are able to reproduce the issue, create a bug ticket in our issue tracker( and attach that reproducer.