Skip to content

Do not use @Data for JPA Entities #1

@mlemnian

Description

@mlemnian

You shouldn't use lombok's @Data annotation in case of JPA entities.
In the case of entities, two entities are the same iff their @Ids are the same! Lombok is not aware of that, because it generates primitive equals() and hashcode() methods.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions