Quarkus Hibernate with Panache Next renamed to Quarkus Data Hibernate

Goodbye Hibernate with Panache Next… welcome Quarkus Data Hibernate 🥳

It’s already been a while since we introduced Quarkus Hibernate with Panache Next, and since then, we’ve decided to move closer to the Jakarta Data standard, as well as rename the module to Quarkus Data Hibernate.

I’ll repeat the original disclaimer: this is a new extension, which is experimental, which means everything about it can (and probably will) change: the extension name, the package names, the class names and even the API. We are releasing it because we feel it’s in a good shape to be tested and discussed by the community, and we hope to get better feedback before we commit to anything like names or API.

Please report feedback either on Zulip or via GitHub issues.

What changed since last time?

And many other bug fixes.

Need feedback

We’re currently working on various issues, but we could especially use feedback on the following topics:

Paging

We’re switching to Jakarta Data Page and PageRequest for paging, including using cursors. This one will introduce a new API on PanacheQuery for paging: https://github.com/quarkusio/quarkus/issues/53431

    @Transactional
    void offsetPage() {
        PanacheBlockingQuery<MyEntity> query = MyEntity_.managedBlocking().findAll();

        List<MyEntity> list = query.paging().offset(0, 10).list();
        while (query.paging().hasNext()) {
            list = query.paging().next().list();
        }
    }

    @Transactional
    void cursorPage() {
        PanacheBlockingQuery<MyEntity> query = MyEntity_.managedBlocking().findAll();

        List<MyEntity> list = query.paging().cursored(0, 10).list();
        while (query.paging().hasNext()) {
            list = query.paging().next().list();
        }
    }

    @Transactional
    void limitPage() {
        PanacheBlockingQuery<MyEntity> query = MyEntity_.managedBlocking().findAll();

        List<MyEntity> list = query.limiting().limit(10).list();
    }

Names

  • Our package name from io.quarkus.hibernate.panache to io.quarkus.data.hibernate (this one is pretty obvious)

  • The PanacheEntity name to ManagedEntity (for entities backed by a stateful session), and RecordEntity or ActiveRecord (for entities backed by a stateless session).

  • The PanacheRepository name to… something that would go along with whatever names we pick for our entities 😬

Please comment on the issue if you like this or think of anything better. But please read all the discussion first :)

Automatic configuration of required annotation processor

On https://github.com/quarkusio/quarkus/pull/53901 we have a proof of concept that lets our Maven and Gradle builds automatically configure the required Hibernate Processor annotation processor, so that you can’t forget to add them to your builds.

This raises questions about magic and compatibility with IDEs, so chime in if you have opinions about those.

Let us know

We’re still looking for feedback, and testers.

Give it a try, read the documentation, and give us feedback either on Zulip or via GitHub issues.