diff --git a/core/src/main/java/org/hibernate/sql/ordering/antlr/OrderByFragmentParser.java b/core/src/main/java/org/hibernate/sql/ordering/antlr/OrderByFragmentParser.java index 059bb91c30..7db8b527f4 100644 --- a/core/src/main/java/org/hibernate/sql/ordering/antlr/OrderByFragmentParser.java +++ b/core/src/main/java/org/hibernate/sql/ordering/antlr/OrderByFragmentParser.java @@ -133,7 +133,7 @@ public class OrderByFragmentParser extends GeneratedOrderByFragmentParser { } if ( replacements == null || replacements.length == 0 ) { - return getASTFactory().create( OrderByTemplateTokenTypes.IDENT, Template.TEMPLATE + "." + ident ); + return getASTFactory().create( OrderByTemplateTokenTypes.IDENT, Template.TEMPLATE + "." + text ); } else if ( replacements.length == 1 ) { return getASTFactory().create( OrderByTemplateTokenTypes.IDENT, Template.TEMPLATE + "." + replacements[0] );