0%
September 11, 2025

Use Bytecode Enhancement to Solve the Problem that @JoinColumn and @OneToOne Cannot be Truely Lazy

kotlin

Enable Bytecode Enhancement

plugins {
    id("org.hibernate.orm") version "6.4.4.Final"
}

hibernate {
    enhancement {
        enableLazyInitialization = true      // Makes @OneToOne truly lazy
        enableDirtyTracking = true          
        enableAssociationManagement = true   // Automatic bidirectional association management
    }
}