Загрузка...

How to Fix Lombok @ToString Causing LazyInitializationException in Hibernate | JPA Buddy

#jpa #hibernate #eclipselink #intellijidea #java #kotlin #jpabuddy #lombok

By default, Lombok @ToString implementation prints the class name and all the fields, including the lazy ones. This may lead to a LazyInitializationException or harm the performance. To fix it, simply add @ToString.Exclude to all lazy fields, or let JPA Buddy do it for you :)

JPA Buddy is an IntelliJ IDEA plugin that helps developers work efficiently with Hibernate, EclipseLink, Spring Data JPA, Flyway, Liquibase, Lombok, MapStruct, and other related technologies in both Java and Kotlin.

The plugin is intended to:
– Lower barrier to entry into development with JPA
– Boost developer’s productivity
– Make sure your code follows best practices

JPA Buddy delivers:
– Intuitive wizards to work with JPA
– Automatic database versioning changelog generation
– Smart inspections to make the code better
– JPA Entities generation based on tables (reverse engineering)
– Visual DTO designer and mapper code generator

You can use JPA Buddy in any project with Spring Boot, Jakarta Enterprise Edition, Quarkus, Micronaut, or even without any framework.

Download IntelliJ IDEA: https://jb.gg/5r06j0

Join us:
Website: https://jb.gg/website
Blog: https://jb.gg/blog
Twitter: https://twitter.com/intellijidea
Facebook: https://www.facebook.com/IntelliJIDEA/
YouTube: https://www.youtube.com/@intellijidea

Видео How to Fix Lombok @ToString Causing LazyInitializationException in Hibernate | JPA Buddy канала JPA Buddy
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять