Skip to content

Commit 18499fa

Browse files
rayudu3745gavinking
authored andcommitted
HHH-19707 - Include value column name in TableStructure InitCommand
1 parent 165472c commit 18499fa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

hibernate-core/src/main/java/org/hibernate/id/enhanced/TableStructure.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,10 @@ public void registerExportables(Database database) {
330330

331331
table.setOptions( options );
332332

333-
table.addInitCommand( context -> new InitCommand( "insert into "
334-
+ context.format( physicalTableName ) + " values ( " + initialValue + " )" ) );
333+
table.addInitCommand( context -> new InitCommand(
334+
"insert into " + context.format( physicalTableName )
335+
+ " ( " + valueColumnNameText + " ) values ( " + initialValue + " )"
336+
) );
335337
}
336338
}
337339

0 commit comments

Comments
 (0)