diff --git a/tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/AbstractQueryMethod.java b/tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/AbstractQueryMethod.java index 92638287e6..1536ca7650 100644 --- a/tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/AbstractQueryMethod.java +++ b/tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/AbstractQueryMethod.java @@ -376,7 +376,8 @@ public abstract class AbstractQueryMethod implements MetaAttribute { .append(MAKE_KEYED_PAGE .replace("pageRequest", parameterName(JD_PAGE_REQUEST, paramTypes, paramNames)) - .replace("Entity", annotationMetaEntity.importType(returnTypeName))); + .replace("Entity", annotationMetaEntity.importType(returnTypeName))) + .append('\n'); } } @@ -646,7 +647,7 @@ public abstract class AbstractQueryMethod implements MetaAttribute { .append(annotationMetaEntity.importType("jakarta.data.page.impl.PageRecord")) .append('(') .append(parameterName(JD_PAGE_REQUEST, paramTypes, paramNames)) - .append(", _results, _totalResults);\n"); + .append(", _results, _totalResults);"); break; case JD_CURSORED_PAGE: if ( returnTypeName == null ) { diff --git a/tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/CriteriaFinderMethod.java b/tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/CriteriaFinderMethod.java index 580a295863..947d514c3c 100644 --- a/tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/CriteriaFinderMethod.java +++ b/tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/CriteriaFinderMethod.java @@ -112,10 +112,6 @@ public class CriteriaFinderMethod extends AbstractFinderMethod { final boolean mustUnwrap = containerType != null && containerType.startsWith("org.hibernate"); executeSelect( declaration, paramTypes, containerType, unwrapped, mustUnwrap ); - if ( dataRepository ) { - declaration - .append('\n'); - } } private void createCriteriaQuery(StringBuilder declaration) {