It amazing for me, for solving Field 'id' doesn't have a default value? I have tried all the possible ways what are given here like..
set sql_mode=""
set @@sql_mode = ''; etc
but unfortunately these didn't work for me. So after long investigation, I found that
@Entity
@Table(name="vendor_table")
public class Customer {
@Id
@Column(name="cid")
private int cid;
.....
}
@Entity
@Table(name="vendor_table")
public class Vendor {
@Id
private int vid;
@Column
private String vname;
.....
}
here you can see that both tables are having same name. It is very funny mistake, was done by me :)))). After correcting this,my problem was gone off.