I am using hibernate with postgresql. I am curious if is it possible to map for example this entity:
@Entity
@Data
@NoArgsConstructor
class User {
@Id
private Long id;
private String firstName;
private String lastName;
}
in database I have columns like first_name, last_name. I got error that I introduce wrong names (when I add for example @Column(name = "first_name")
; everything is ok. How can I avoid adding @Column
neither change database?