Insert row to table with the only identifier column with EclipseLink
问题 I have an entity: @Entity public class MyEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = Columns.ID) private Long id; // getter & setter } Then, I create an instance of the entity MyEntity my = new MyEntity(); and want to save it with DAO (using Spring Data for JPA) - dao.save(my); . I got the following exception: Caused by: Exception [EclipseLink-6023] (Eclipse Persistence Services - 2.4.0.v20120608-r11652): org.eclipse.persistence.exceptions.QueryException