I\'m using JPA (EclipseLink) and Spring. Say I have a simple entity with an auto-generated ID:
@Entity public class ABC implements Serializable { @Id
This is how I did it. You can try
public class ABCService { @Resource(name="ABCDao") ABCDao abcDao; public int addNewABC(ABC abc) { ABC.setId(0); return abcDao.insertABC(abc); } }