[jboss-user] [JBoss Seam] - Getting Id of Presisted object.

waheed.murad do-not-reply at jboss.com
Fri May 11 02:45:23 EDT 2007


hii.

i am using entitymanger to presist Object as:

Customer cust;
em.presist(cust);

the id of customer is auto generated (in my case it is Oracle Sequence).

after presistance i want to get the id of the presisted Object. like

Customer cust;
em.presist(cust);
// Want to get the Id here;
cust.getId();


it returns null (as object is not syncronized with the database). 
thanks for you help.


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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044879



More information about the jboss-user mailing list