note down an important TODO for later

This commit is contained in:
Gavin 2022-12-19 21:25:48 +01:00 committed by Gavin King
parent 0f4cdc3bdb
commit 250995336b
3 changed files with 6 additions and 0 deletions

View File

@ -66,6 +66,10 @@ public class H2SqlAstTranslator<T extends JdbcOperation> extends AbstractSqlAstT
assert tableInsert.getReturningColumns() != null assert tableInsert.getReturningColumns() != null
&& !tableInsert.getReturningColumns().isEmpty(); && !tableInsert.getReturningColumns().isEmpty();
//TODO: This is a terrible way to solve this problem, please fix it!
// Not every "returning insert" statement has something to do
// with identity columns! (Nor is it an elegant implementation.)
final H2IdentityColumnSupport identitySupport = (H2IdentityColumnSupport) getSessionFactory() final H2IdentityColumnSupport identitySupport = (H2IdentityColumnSupport) getSessionFactory()
.getJdbcServices() .getJdbcServices()
.getDialect() .getDialect()

View File

@ -34,6 +34,7 @@ public class H2FinalTableIdentityColumnSupport extends H2IdentityColumnSupport {
return "select " + identityColumnName + " from final table ( " + insertString + " )"; return "select " + identityColumnName + " from final table ( " + insertString + " )";
} }
@Deprecated //TODO: move this logic back to H2SqlAstTranslator
public void render( public void render(
TableInsert tableInsert, TableInsert tableInsert,
Consumer<String> sqlAppender, Consumer<String> sqlAppender,

View File

@ -48,6 +48,7 @@ public class H2IdentityColumnSupport extends IdentityColumnSupportImpl {
void renderInsertValues(); void renderInsertValues();
} }
@Deprecated //TODO: get rid of this layer-breaking method!
public void render( public void render(
TableInsert tableInsert, TableInsert tableInsert,
Consumer<String> sqlAppender, Consumer<String> sqlAppender,