Greetings all,
I have an EJB3 stateless bean that defines the following entity manager:
@PersistenceContext
@PersistenceUnit(unitName = "SimPersistence")
EntityManager em;
When I persist a new object via em.persist(o) I need to get the value of the identity column back. How can I do that? o.getId() returns 0. I have tried em.flush() followed by em.refresh(o) which did not work either.
Any and all help is appreciated.
Earnie!