HHH-17428 ParameterMarkerStrategy markers are 1 based
The position argument in `ParameterMarkerStrategy#createMarker` is 1-based, but `StandardTemporaryTableExporter#getSqlTruncateCommand` calls it passing a 0. Hibernate Reactive is affected by this when running queries on CockroachDB. Hibernate ORM generates queries using `?` as marker and it's not affected by it unless somebody implements the service.
This commit is contained in:
parent
ab861e99fb
commit
755ed17bd4
|
@ -106,7 +106,7 @@ public class StandardTemporaryTableExporter implements TemporaryTableExporter {
|
|||
.getFastSessionServices().parameterMarkerStrategy;
|
||||
return getTruncateTableCommand() + " " + idTable.getQualifiedTableName()
|
||||
+ " where " + idTable.getSessionUidColumn().getColumnName() + " = "
|
||||
+ parameterMarkerStrategy.createMarker( 0, null );
|
||||
+ parameterMarkerStrategy.createMarker( 1, null );
|
||||
}
|
||||
else {
|
||||
return getTruncateTableCommand() + " " + idTable.getQualifiedTableName();
|
||||
|
|
Loading…
Reference in New Issue