48

Data Objects aren't entities

 4 years ago
source link: https://mdeinum.github.io/2019-02-13-Lombok-Data-Ojects-Arent-Entities/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
When using a framework like Lombok it is very tempting and eays to use its @Data annotation. All together now: A shortcut for @ToString, @EqualsAndHashCode, @Getter on all fields, @Setter on all non-final fields, and @RequiredArgsConstructor! (Source: Lombok Documentation) TL;DR You probably don’t want to use @Data annotation with @Entity...

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK