HHH-18267 Informix insert value to identity column error

This commit is contained in:
Vladimír Kuruc 2024-06-13 15:43:04 +02:00 committed by Christian Beikov
parent 623fe204b4
commit 3d72ab25f0
2 changed files with 11 additions and 0 deletions

View File

@ -714,4 +714,8 @@ public class InformixDialect extends Dialect {
return "null::" + typeName;
}
@Override
public String getNoColumnsInsertString() {
return "values (0)";
}
}

View File

@ -23,6 +23,7 @@ import org.hibernate.sql.ast.tree.select.QueryPart;
import org.hibernate.sql.ast.tree.select.QuerySpec;
import org.hibernate.sql.ast.tree.select.SelectClause;
import org.hibernate.sql.exec.spi.JdbcOperation;
import org.hibernate.sql.model.internal.TableInsertStandard;
/**
* A SQL AST translator for Informix.
@ -174,6 +175,12 @@ public class InformixSqlAstTranslator<T extends JdbcOperation> extends AbstractS
}
}
@Override
protected void renderInsertIntoNoColumns(TableInsertStandard tableInsert) {
renderIntoIntoAndTable( tableInsert );
appendSql( "values (0)" );
}
private boolean supportsParameterOffsetFetchExpression() {
return getDialect().getVersion().isSameOrAfter( 11 );
}