From 95c14ada9005f89b2a4f4cb9b80f30d1dd3356d2 Mon Sep 17 00:00:00 2001 From: Andrea Boriero Date: Tue, 16 Aug 2022 16:15:02 +0200 Subject: [PATCH] HHH-15440 @OneToOne and @OptimisticLock(excluded = true) not working correctly --- .../src/main/java/org/hibernate/cfg/OneToOneSecondPass.java | 1 + 1 file changed, 1 insertion(+) diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/OneToOneSecondPass.java b/hibernate-core/src/main/java/org/hibernate/cfg/OneToOneSecondPass.java index 1b35c941d6..8123af8b78 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/OneToOneSecondPass.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/OneToOneSecondPass.java @@ -108,6 +108,7 @@ public class OneToOneSecondPass implements SecondPass { PropertyBinder binder = new PropertyBinder(); binder.setName( propertyName ); + binder.setProperty( inferredData.getProperty() ); binder.setValue( value ); binder.setCascade( cascadeStrategy ); binder.setAccessType( inferredData.getDefaultAccess() );