'org.hibernate.PropertyValueException: not-null property references a null or transient value while using Spring Boot

I am getting this error while inserting data into table using Spring boot framework via POSTMAN RESTAPI:

org.hibernate.PropertyValueException: not-null property references a null or transient value: com.example.demo.model.Employee.firstName

This is my Employee Entity class:

@Data
@Entity
@Table(name="employees")

public class Employee {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long id;

    @Column(name = "first_name", nullable = false)
    private String firstName;

    @Column(name = "last_name")
    private String lastName;

    @Column(name = "email")
    private String email;
}


Solution 1:[1]

Did you set constructor with lomboak?

@AllArgsConstructor
@NoArgsConstructor? 

Check other column constrain like nullable =false

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 General Grievance