19 July 2021

What's New in JPA Buddy — July 2021

JPA Buddy keeps evolving, with new features being rolled out each release. Let’s look at the main features added in the latest couple of releases.

Visual Tools for SQL Files

In some cases, it’s useful to have SQL scripts for the data model, especially when you need to quickly set up a fresh database. That’s why we added visual tools to generate #DDL for tables, create and modify indexes, constraints and many other things:

Another way to see DDL for an entity is to use the new “Show DDL” action:

Flyway Callbacks and Java/Kotlin Migrations

Flyway supports callbacks in Java and SQL, which are useful for many housekeeping tasks like rebuilding materialized views or calling an external system. JPA Buddy lets you create callbacks in both SQL and Java/Kotlin:

Flyway also allows you to create migrations in Java or Kotlin, which are much more flexible than regular SQL. Now you can scaffold them using JPA Buddy:

Liquibase Changelog Structure

Liquibase changelog display in the JPA Structure panel has been reworked: now it’s based on the hierarchy of changelogs (i.e. which changelog is included into which), not the folder structure. This allows for a clear view of the changes:

Diff Generator Improvements

Liquibase and Flyway diff generator is one of the most useful JPA Buddy features, so a lot of work is put into it. Here are the recent improvements:

  • Support for the following annotations:
    • @ElementCollection and @CollectionTable
    • @MapsId
    • Unidirectional @OneToMany without @JoinColumn
  • Ability to provide a default value when creating an “addNotNullConstraint” change.
  • “Max DB identifier length” setting to make sure the generated names in migrations scripts will be compatible with the target DB.
  • Search scope for diff generation that lets you narrow down which entity classes to analyze:
    • All Places
    • Project
    • Project and Libraries
    • Project and Tests
    • Tests only

Also, a new “Diff changes” action has been added to the “Other” category in JPA Palette and the IDEA “Generate” menu (Alt + Insert or Cmd + N):

Using Spring Data JPA, Hibernate or EclipseLink and code in IntelliJ IDEA? Make sure you are ultimately productive with the JPA Buddy plugin!

It will always give you a valuable hint and even generate the desired piece of code for you: JPA entities and Spring Data repositories, Liquibase changelogs and Flyway migrations, DTOs and MapStruct mappers and even more!


These are just some of the features that were added in the latest releases. Others include better Kotlin integration, displaying physical table/column names in the JPA Inspector panel, drag and drop support for JPA Palette and many more improvements and fixes.
You can find the full list in release notes for each version on our plugin page.

Many of the features were suggested by our community. If you have any suggestions or feedback, don’t hesitate to contact us via our Discord channel or our Twitter page, which is also the best place to learn about new JPA Buddy features.