Assigning NULL value to the persistent column

Viewed 2845

I am new to JPA so pardon if my question seems to be trivial.

I have an entity named customer

@Entity("CUSTOMER_DETAILS")
public class Customer {

    @Id
    @Column(name = "customer_id")
    private String customerId = null;    

    @Column(name = "name")
    private String name = null;

    @Column(name = "Id")
    private String Id = null;

    @Transient
    private List<Coupons> coupons;
}

One of my seniors was stating that setting the persistence columns to null is a bad practice. Kindly clarify

2 Answers
Related