6 December 2022

What's new in JPA Buddy 2022.5

The new major release of JPA Buddy is out! The 2022.5 version brings new features, improvements, and bug fixes. Among them:

  • The redesigned JPA Buddy panel that fits perfectly with the new IntelliJ IDEA UI
  • A lot of coding assistance features that make the coding process even more joyful
  • A brand new "Entity from POJO" action that allows generating JPA entities from any java/kotlin classes

Keep reading to learn more about these features and even more!

New UI

IntelliJ IDEA 2022.3 introduced a new UI that feels fresh and clean. It also brings new design code. Now, you can open only one tool window on each side. Given the new circumstances, all three JPA Buddy tool windows (Structure, Panel and Inspector) now represent a unified panel.

Coding Assistance Features

Modern JPA-based applications are usually layered as follows:

  • Entities contain only data
  • Spring Data repositories declare CRUD operations for entities
  • DTOs and mappers that transfer entities to their DTOs

Such segregation looks natural because each layer has its clear responsibility area. However, it brings additional complexity during development due to bad discoverability for different operations available over entities.

JPA Buddy addresses this problem by integrating many coding assistance features for JPA entities, Spring Data repositories, DTOs and MapStruct mappers that make development more straightforward and transparent.

Generate JPA Entities from any Java & Kotlin Classes

JPA Buddy introduces the "Entity from POJO" action that helps to generate a JPA entity from any java/kotlin class. This feature may be helpful if you develop your application following the API-first approach: define DTOs for the API first and implement the data model later.

The most remarkable thing about JPA Buddy is that it even detects the relationship's cardinality and allows to generate related entities or select existing ones:

Keep DTOs in sync with its JPA Entity

We continue improving DTOs <-> Entity synchronization actions. Since this release, in addition to refactoring action, you can also add fields from entity to DTOs and vice versa:

MapStruct Mapper Improvements

JPA Buddy has significantly improved his skills in working with MapStruct. With its help, you can now:

  1. Create MapStruct mappers from the separate wizard
  1. Build a hierarchy of mappers via generic interfaces
  1. Generate collection mapping methods
  1. Define naming patterns and strategies for mapper methods

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!

Conclusion

This article covers just a few improvements. However, there are many more: the ability to generate JPA-related objects from unresolved references based on name patterns, @TimeZoneStorage and @TimeZoneColumn support, Editor Toolbar improvements, and over 60 others that you can find in our in our issue tracker.

As always, we are happy to see your feedback and ideas on our Discord channel. Follow us on Twitter to get the latest news about JPA Buddy along with helpful JPA tips!