Skip to content

Commit 2d35efa

Browse files
rayudu3745gavinking
authored andcommitted
HHH-19991: fixes build failures due to spanner change
1 parent 7dc3e68 commit 2d35efa

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

hibernate-core/src/main/java/org/hibernate/dialect/sql/ast/SpannerSqlAstTranslator.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ protected void visitDeleteStatementOnly(DeleteStatement statement) {
122122
renderDeleteClause( statement );
123123
appendSql( " where true" );
124124
visitReturningColumns( statement.getReturningColumns() );
125-
} else {
125+
}
126+
else {
126127
super.visitDeleteStatementOnly( statement );
127128
}
128129
}
@@ -135,7 +136,8 @@ protected void visitUpdateStatementOnly(UpdateStatement statement) {
135136
renderSetClause( statement.getAssignments() );
136137
appendSql( " where true" );
137138
visitReturningColumns( statement.getReturningColumns() );
138-
} else {
139+
}
140+
else {
139141
super.visitUpdateStatementOnly( statement );
140142
}
141143
}

hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/SpannerSchemaCreationColumnTypesTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void testSchemaCreation() throws Exception {
7171

7272
final String fileContent = new String( Files.readAllBytes( output.toPath() ) );
7373

74-
assertThat(fileContent.toLowerCase( Locale.ROOT )).contains( "create table test_entity_table" );
74+
assertThat(fileContent.toLowerCase(Locale.ROOT)).contains("create table if not exists test_entity_table");
7575
assertThat(fileContent.toLowerCase( Locale.ROOT )).contains( "id int64 not null" );
7676
assertThat(fileContent.toLowerCase( Locale.ROOT )).contains( "name_column string(255)" );
7777
}

0 commit comments

Comments
 (0)