diff --git a/core/src/main/java/org/hibernate/id/enhanced/TableStructure.java b/core/src/main/java/org/hibernate/id/enhanced/TableStructure.java index 94063be0ef..e0a3654e0b 100644 --- a/core/src/main/java/org/hibernate/id/enhanced/TableStructure.java +++ b/core/src/main/java/org/hibernate/id/enhanced/TableStructure.java @@ -68,7 +68,7 @@ public class TableStructure extends TransactionHelper implements DatabaseStructu this.incrementSize = incrementSize; this.valueColumnName = valueColumnName; - selectQuery = "select " + valueColumnName + " id_val" + + selectQuery = "select " + valueColumnName + " as id_val" + " from " + dialect.appendLockHint( LockMode.UPGRADE, tableName ) + dialect.getForUpdateString();