BBarisKilic / HRMS-Backend

A Spring Boot application. This repository contains the backend part of the Human Resources Management System. The project has been written solely in Java Language.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feat: remove data annotation from entities

BBarisKilic opened this issue · comments

For #1

See the following link:

  • Remove Data annotation
  • Add ToString annotation.
  • EqualsAndHashCode also can cause performance issues.
  • According to the JPA specification, all entity classes are required to have a public or protected no-argument constructor.

  • remove @Data annotation
  • remove @EqualsAndHashCode annotation
  • add @ToString(onlyExplicitlyIncluded = true) to entity classes
  • add not only @AllArgsConstructor annotation but also @NoArgsConstructor annotation to entity classes