Updates on child table do not happen with fetchType as Lazy

I just upgraded from spring boot version from 2.7.9 to 2.7.10, but I find an unusual beahviour , that updates on child table on below pojo does not happen:-

@JsonIgnoreProperties(ignoreUnknown = true)
@Entity
@RemoteResource("/cloudSite")
@Table(name = "cloud_sites")
@JsonAutoDetect(fieldVisibility = Visibility.ANY)
public class CloudSite implements Serializable {

    private static final long serialVersionUID = 4701261544750504567L;

    @JsonProperty
    @BusinessKey
    @Id
    @Column(name = "ID")
    private String id;

    @JsonProperty("region_id")
    @BusinessKey
    @Column(name = "REGION_ID")
    private String regionId;

    @JsonProperty("aic_version")
    @BusinessKey
    @Column(name = "CLOUD_VERSION")
    private String cloudVersion;

    @JsonProperty("clli")
    @BusinessKey
    @Column(name = "CLLI")
    private String clli;

    @JsonProperty("platform")
    @BusinessKey
    @Column(name = "PLATFORM")
    private String platform;

    @JsonProperty("orchestrator")
    @BusinessKey
    @Column(name = "ORCHESTRATOR")
    private String orchestrator;

    @JsonProperty("cloudify_id")
    @BusinessKey
    @Column(name = "CLOUDIFY_ID")
    private String cloudifyId;

    @JsonProperty("cloud_owner")
    @BusinessKey
    @Column(name = "CLOUD_OWNER")
    private String cloudOwner;

    // Derived property (set by CloudConfig loader based on identityServiceId)
    @BusinessKey
    @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
    @JoinColumn(name = "identity_service_id")
    private CloudIdentity identityService;

    @BusinessKey
    @JsonProperty("identity_service_id")
    private transient String identityServiceId;

    @JsonProperty("last_updated_by")
    @BusinessKey
    @Column(name = "LAST_UPDATED_BY")
    private String lastUpdatedBy;

    @JsonProperty("creation_timestamp")
    @BusinessKey
    @Column(name = "CREATION_TIMESTAMP", updatable = false)
    @Temporal(TemporalType.TIMESTAMP)
    private Date created;

    @JsonProperty("update_timestamp")
    @BusinessKey
    @Column(name = "UPDATE_TIMESTAMP")
    @Temporal(TemporalType.TIMESTAMP)
    private Date updated;

    @JsonProperty("support_fabric")
    @BusinessKey
    @Column(name = "SUPPORT_FABRIC", nullable = false)
    private Boolean supportFabric = true;

    @JsonProperty("fabric_config_status")
    @BusinessKey
    @Column(name = "FABRIC_CONFIG_STATUS")
    private String fabricConfigStatus;

    @Transient
    private URI uri;

    public CloudSite() {

    }

    private static final Logger logger = LoggerFactory.getLogger(CloudSite.class);

    @PrePersist
    protected void onCreate() {
        this.created = new Date();
        this.updated = new Date();
        logger.info("Creating CloudSite: " + this.toString());
    }

    @PreUpdate
    protected void onUpdate() {
        this.updated = new Date();
        logger.info("Updating CloudSite: " + this.toString());
    }

    public CloudSite(CloudSite site) {
        this.cloudVersion = site.getCloudVersion();
        this.clli = site.getClli();
        this.id = site.getId();
        this.identityService = site.getIdentityService();
        this.orchestrator = site.getOrchestrator();
        this.platform = site.getPlatform();
        this.regionId = site.getRegionId();
        this.identityServiceId = site.getIdentityServiceId();
        this.supportFabric = site.getSupportFabric();
        this.fabricConfigStatus = site.getFabricConfigStatus();
    }


    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @ResourceId
    public URI getUri() {
        return this.uri;
    }

    public void setUri(URI uri) {
        this.uri = uri;
    }

    public String getRegionId() {
        return regionId;
    }

    public void setRegionId(String regionId) {
        this.regionId = regionId;
    }

    public String getIdentityServiceId() {
        return identityServiceId == null ? (identityService == null ? null : identityService.getId())
                : identityServiceId;
    }

    public String getCloudVersion() {
        return cloudVersion;
    }

    public void setCloudVersion(String cloudVersion) {
        this.cloudVersion = cloudVersion;
    }

    public String getClli() {
        return clli;
    }

    public void setClli(String clli) {
        this.clli = clli;
    }

    public String getCloudifyId() {
        return cloudifyId;
    }

    public void setCloudifyId(String cloudifyId) {
        this.cloudifyId = cloudifyId;
    }

    public String getLastUpdatedBy() {
        return lastUpdatedBy;
    }

    public Date getCreated() {
        return created;
    }

    public Date getUpdated() {
        return updated;
    }

    public void setLastUpdatedBy(String lastUpdatedBy) {
        this.lastUpdatedBy = lastUpdatedBy;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public void setUpdated(Date updated) {
        this.updated = updated;
    }

    public String getPlatform() {
        return platform;
    }

    public void setPlatform(String platform) {
        this.platform = platform;
    }

    public String getOrchestrator() {
        return orchestrator;
    }

    public void setOrchestrator(String orchestrator) {
        this.orchestrator = orchestrator;
    }

    public CloudIdentity getIdentityService() {
        return identityService;
    }

    public void setIdentityService(CloudIdentity identity) {
        this.identityService = identity;
    }

    public Boolean getSupportFabric() {
        return supportFabric;
    }

    public void setSupportFabric(Boolean supportFabric) {
        this.supportFabric = supportFabric;
    }

    @Deprecated
    public void setIdentityServiceId(String identityServiceId) {
        this.identityServiceId = identityServiceId;
    }

    public String getCloudOwner() {
        return cloudOwner;
    }

    public void setCloudOwner(String cloudOwner) {
        this.cloudOwner = cloudOwner;
    }

    public String getFabricConfigStatus() {
        return fabricConfigStatus;
    }

    public void setFabricConfigStatus(String fabricConfigStatus) {
        this.fabricConfigStatus = fabricConfigStatus;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("regionId", getRegionId())
                .append("identityServiceId", getIdentityServiceId()).append("cloudVersion", getCloudVersion())
                .append("clli", getClli()).append("cloudifyId", getCloudifyId()).append("platform", getPlatform())
                .append("orchestrator", getOrchestrator()).append("cloud-owner", getCloudOwner()).toString();
    }

    @Override
    public boolean equals(final Object other) {
        if (other == null) {
            return false;
        }
        if (!getClass().equals(other.getClass())) {
            return false;
        }
        CloudSite castOther = (CloudSite) other;
        return new EqualsBuilder().append(getRegionId(), castOther.getRegionId())
                .append(getIdentityServiceId(), castOther.getIdentityServiceId())
                .append(getCloudVersion(), castOther.getCloudVersion()).append(getClli(), castOther.getClli())
                .isEquals();
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder(1, 31).append(getRegionId()).append(getIdentityServiceId()).append(getCloudVersion())
                .append(getClli()).toHashCode();
    }
}

Output of Update contains:- “identityService”: { “id”: “MTKEYSTONE”, “hibernateLazyInitializer”: {}, “identity_url”: “http://mso-citrus-simulator-svc:10000/sim/v2.0”, “mso_id”: “m08699”, “mso_pass”: “cPSkmcHVb4FPihlDW2viuAXT8AFgLKbys72bz4z2GhQE4NA=”, }

If I change fetchType to Eager it works fine. Upto Spring boot 2.7.9, there is no problem.

Maybe this is a bug of Hibernate ORM 5.6, I don’t know.
If you are a Red Hat customer, please open a support ticket. If you are not and want a bug fixed, please update to latest Hibernate ORM version, which is currently 6.5. See our Maintenance Policy - Hibernate for further details.

Even Updating to latest hibernate version does not work, I also observed 1 thing.
when I try to update in spring boot 2.7.10 or even to latest versions , I get below hibernate logs,and update to child does not happen :-

Hibernate: select cloudsite0_.id as id1_0_0_, cloudsite0_.clli as clli2_0_0_, cloudsite0_.cloud_owner as cloud_ow3_0_0_, cloudsite0_.cloud_version as cloud_ve4_0_0_, cloudsite0_.cloudify_id as cloudify5_0_0_, cloudsite0_.creation_timestamp as creation6_0_0_, cloudsite0_.fabric_config_status as fabric_c7_0_0_, cloudsite0_.identity_service_id as identit14_0_0_, cloudsite0_.last_updated_by as last_upd8_0_0_, cloudsite0_.orchestrator as orchestr9_0_0_, cloudsite0_.platform as platfor10_0_0_, cloudsite0_.region_id as region_11_0_0_, cloudsite0_.support_fabric as support12_0_0_, cloudsite0_.update_timestamp as update_13_0_0_ from cloud_sites cloudsite0_ where cloudsite0_.id=?

While in 2.7.9 below are hibernate logs and update happen:-

Hibernate: select cloudsite0_.id as id1_0_0_, cloudsite0_.clli as clli2_0_0_, cloudsite0_.cloud_owner as cloud_ow3_0_0_, cloudsite0_.cloud_version as cloud_ve4_0_0_, cloudsite0_.cloudify_id as cloudify5_0_0_, cloudsite0_.creation_timestamp as creation6_0_0_, cloudsite0_.fabric_config_status as fabric_c7_0_0_, cloudsite0_.identity_service_id as identit14_0_0_, cloudsite0_.last_updated_by as last_upd8_0_0_, cloudsite0_.orchestrator as orchestr9_0_0_, cloudsite0_.platform as platfor10_0_0_, cloudsite0_.region_id as region_11_0_0_, cloudsite0_.support_fabric as support12_0_0_, cloudsite0_.update_timestamp as update_13_0_0_ from cloud_sites cloudsite0_ where cloudsite0_.id=?

Hibernate: select cloudident0_.id as id1_1_0_, cloudident0_.admin_project_domain_name as admin_pr2_1_0_, cloudident0_.admin_tenant as admin_te3_1_0_, cloudident0_.creation_timestamp as creation4_1_0_, cloudident0_.identity_url as identity5_1_0_, cloudident0_.last_updated_by as last_upd6_1_0_, cloudident0_.member_role as member_r7_1_0_, cloudident0_.mso_id as mso_id8_1_0_, cloudident0_.mso_pass as mso_pass9_1_0_, cloudident0_.project_domain_name as project10_1_0_, cloudident0_.tenant_metadata as tenant_11_1_0_, cloudident0_.update_timestamp as update_12_1_0_, cloudident0_.user_domain_name as user_do13_1_0_ from identity_services cloudident0_ where cloudident0_.id=?

Hibernate: update cloud_sites set clli=?, cloud_owner=?, cloud_version=?, cloudify_id=?, fabric_config_status=?, identity_service_id=?, last_updated_by=?, orchestrator=?, platform=?, region_id=?, support_fabric=?, update_timestamp=? where id=?

Hibernate: update identity_services set admin_project_domain_name=?, admin_tenant=?, identity_url=?, last_updated_by=?, member_role=?, mso_id=?, mso_pass=?, project_domain_name=?, tenant_metadata=?, update_timestamp=?, user_domain_name=? where id=?

Hibernate: update cloud_sites set clli=?, cloud_owner=?, cloud_version=?, cloudify_id=?, fabric_config_status=?, identity_service_id=?, last_updated_by=?, orchestrator=?, platform=?, region_id=?, support_fabric=?, update_timestamp=? where id=?

Hibernate: select cloudident0_.id as id1_1_0_, cloudident0_.admin_project_domain_name as admin_pr2_1_0_, cloudident0_.admin_tenant as admin_te3_1_0_, cloudident0_.creation_timestamp as creation4_1_0_, cloudident0_.identity_url as identity5_1_0_, cloudident0_.last_updated_by as last_upd6_1_0_, cloudident0_.member_role as member_r7_1_0_, cloudident0_.mso_id as mso_id8_1_0_, cloudident0_.mso_pass as mso_pass9_1_0_, cloudident0_.project_domain_name as project10_1_0_, cloudident0_.tenant_metadata as tenant_11_1_0_, cloudident0_.update_timestamp as update_12_1_0_, cloudident0_.user_domain_name as user_do13_1_0_ from identity_services cloudident0_ where cloudident0_.id=?

Please try to create a reproducer with our test case template and if you are able to reproduce the issue, create a bug ticket in our issue tracker and attach that reproducer.