diff --git a/jnosql-mapping/jnosql-mapping-semistructured/src/main/java/org/eclipse/jnosql/mapping/semistructured/query/CustomRepositoryHandler.java b/jnosql-mapping/jnosql-mapping-semistructured/src/main/java/org/eclipse/jnosql/mapping/semistructured/query/CustomRepositoryHandler.java index eaef8cb25..1850c9625 100644 --- a/jnosql-mapping/jnosql-mapping-semistructured/src/main/java/org/eclipse/jnosql/mapping/semistructured/query/CustomRepositoryHandler.java +++ b/jnosql-mapping/jnosql-mapping-semistructured/src/main/java/org/eclipse/jnosql/mapping/semistructured/query/CustomRepositoryHandler.java @@ -102,8 +102,17 @@ public Object invoke(Object instance, Method method, Object[] params) throws Thr case OBJECT_METHOD -> { return unwrapInvocationTargetException(() -> unwrapInvocationTargetException(() -> method.invoke(this, params))); } - case FIND_ALL, FIND_BY, PARAMETER_BASED, CURSOR_PAGINATION -> { - return unwrapInvocationTargetException(() -> repository(method).invoke(instance, method, params)); + case PARAMETER_BASED -> { + return unwrapInvocationTargetException(() -> repository(method).executeParameterBased(instance, method, params)); + } + case CURSOR_PAGINATION -> { + return unwrapInvocationTargetException(() -> repository(method).executeCursorPagination(instance, method, params)); + } + case FIND_ALL -> { + return unwrapInvocationTargetException(() -> repository(method).executeFindAll(instance, method, params)); + } + case FIND_BY -> { + return unwrapInvocationTargetException(() -> repository(method).executeFindByQuery(instance, method, params)); } case CUSTOM_REPOSITORY -> { Object customRepository = CDI.current().select(method.getDeclaringClass()).get();