If you use entityManager.merge(pojo) then it returns the persisted Pojo object 
from which you can get the ID.
So, for example, you can do
Pojo pojo = new Pojo();
  | //Fill pojo with info....
  | Pojo pojo2 = entityManager.merge(pojo);
  | pojo2.getId(); //There it is....
Actual code might need to be more robust :-)

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097351#4097351

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097351
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to