Skip to content

Hibernate Panache Next - findAll().list() #52594

@myfear

Description

@myfear

Description

findAll().list() is a two-step for “get all”

I have to use repo.findAll().list() for “list all”. Classic Panache Repository had listAll(). The two-step call is consistent with a query-builder style (findAll() returns something pageable/filterable) but forces an extra method call for the very common “get all” case.

// AuthorResource.java
return repo.findAll().list();   // two steps; listAll() would be one

Implementation ideas

Offer a convenience method such as listAll() that returns List<Entity> (blocking) or Uni<List<Entity>> (reactive), implemented as findAll().list(), so simple list endpoints don’t need the extra step.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions