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
em.persist(abc); em.refresh(abc); return abc;