27 February 2023

What's new in JPA Buddy 2023.1

We're excited to announce our first major release of the year! This new version comes with a lot of improvements, including:

  • Improved DTO Generator and Coding Assistance features.
  • Better support for new Hibernate 6 features.
  • Improved Spring Audit support for smoother and more effortless usage.
  • Several bug fixes to enhance the stability of the plugin.

And that's not all! There's even more to discover, so keep reading to learn about all the exciting new features.

DTO generator: no more limitations!

Nowadays, the DTO pattern is widely used in software development. It's often used not just with JPA entities, but also with regular POJO classes. And with JPA Buddy's latest update, you're no longer restricted to using DTOs with just JPA entities. You can now create DTOs from any Java or Kotlin class, giving you more flexibility and control over your code. For example, check out how easy you can use JPA Buddy with MongoDB documents:

Improved Coding Assistance for Kotlin

Developers love Kotlin, and it consistently ranks as one of the most popular programming languages in surveys. JPA Buddy has been supporting Kotlin since its early versions, and we're working to make it even better. Now, all the features that Java developers love are also available to Kotlin fans. Whether you're creating Spring Data repositories on the fly, injecting MapStruct mappers, or scaffolding method calls – JPA Buddy has got you covered. And if you're looking to create a REST endpoint in Kotlin, JPA Buddy makes it incredibly easy:

We've also introduced a flexible configuration of how the coding assistance works. This means you can fine-tune the coding assistance to your specific needs, making it even more helpful in your development work.

Better Hibernate 6 Support

The release of Hibernate 6 was a significant event, and the JPA Buddy team has been consistently adding support for its new features across multiple major versions. In this release, we have added support for the @JavaType and @JavaTypeRegistration annotations. These annotations now can be used for both: generating database versioning scripts and reverse engineering. If you want to configure JPA Buddy to work flawlessly with these new annotations, check out the video:

Flexible UI

When the IntelliJ IDEA team announced new UI, they received a lot of feedback from users who were unhappy about the inability to open multiple panels on the sides. The team heard the community's concerns and announced that the beloved feature would be added back.

So, we have decided to do the following:

  • Restore the ability to separate the JPA Structure from the Designer.
  • Add more flexibility to the settings – customize panel display in any way you can imagine: separately, together, fully hidden or in the standard panel.

Auditing Support

Having auditing in a large application is a crucial aspect. With JPA Buddy, you can now effortlessly include commonly used audit fields by utilizing annotations such as @CreatedBy, @CreatedDate, @LastModifiedBy and @LastModifiedDate. What's more, JPA Buddy will notify you if you forget to add the @EnableJpaAuditing annotation to your configuration or if the AuditingEntityListener is not added to the current entity. This leaves even less room for the mistake!

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

While this article covers a few improvements, there are many others to look out for, such as support for YAML configuration files to detect connection parameters, availability for IntelliJ IDEA 2023.1, improved detection of Lombok dependency, and over 60 more updates that can be found 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!