Skip to content

Commit 8a88603

Browse files
committed
HHH-15520 ValueGeneration on @OnetoOne leads to boot error
1 parent e931a80 commit 8a88603

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

hibernate-core/src/main/java/org/hibernate/cfg/annotations/PropertyBinder.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,10 +317,12 @@ public Property makeProperty() {
317317
property.setReturnedClassName( returnedClassName );
318318

319319
if ( this.property != null ) {
320-
handleNaturalId( property );
321-
property.setValueGenerationStrategy( determineValueGenerationStrategy(this.property) );
320+
if ( entityBinder != null ) {
321+
handleNaturalId( property );
322+
property.setValueGenerationStrategy( determineValueGenerationStrategy( this.property ) );
323+
}
322324
// HHH-4635 -- needed for dialect-specific property ordering
323-
property.setLob( this.property.isAnnotationPresent(Lob.class) );
325+
property.setLob( this.property.isAnnotationPresent( Lob.class ) );
324326
}
325327

326328
property.setInsertable( insertable );

0 commit comments

Comments
 (0)