diff --git a/hibernate-core/src/main/java/org/hibernate/criterion/SizeExpression.java b/hibernate-core/src/main/java/org/hibernate/criterion/SizeExpression.java index bb7a731143..82a86ce094 100755 --- a/hibernate-core/src/main/java/org/hibernate/criterion/SizeExpression.java +++ b/hibernate-core/src/main/java/org/hibernate/criterion/SizeExpression.java @@ -6,6 +6,8 @@ */ package org.hibernate.criterion; +import java.util.Locale; + import org.hibernate.Criteria; import org.hibernate.HibernateException; import org.hibernate.engine.spi.TypedValue; @@ -45,6 +47,7 @@ public class SizeExpression implements Criterion { .setCondition( pk, fk ); return String.format( + Locale.ROOT, "? %s (select count(*) from %s where %s)", op, cp.getTableName(),