Ethan Miller
Ethan Miller

Reputation: 571

Custom Query REST Data with Panache

I am using REST Data with Panache for JAX RESTful Web Service generation by extending PanacheEntityResource. In Spring land there is query builder mechanism that allows the Spring Data repository to generate an SQL query based on the name and return type of the custom method signature.

I'm trying to achieve the same thing using Panache, so far unsuccessfully.

@ResourceProperties(path = "tasks", paged = false)
public interface TaskResource extends PanacheEntityResource<Task, UUID> {

    List<Task> findByOrganizationId(@QueryParam("organizationId") UUID organizationId);
}

I want to pass the organazation ID as a query parameter, such that my request will be http://localhost:8080/tasks?organizationId=1e7e669d-2935-4d6f-8b23-7a2497b0f5b0, and my response will return a list of Tasks whose organization ID matches the one provided. Is there support for this functionality?

Upvotes: 1

Views: 1911

Answers (1)

geoand
geoand

Reputation: 64009

That functionality is currently not supported. See https://quarkus.io/guides/rest-data-panache and https://quarkus.io/guides/spring-data-rest for more details

Upvotes: 1

Related Questions