Your sequence looks correct. I don't have the code here but I think I'm doing this:
em.persist(entity); | em.flush(); | em.refresh(entity); to get the sequence. I don't think EntityManager uses the primary key to find the persistent state. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045196#4045196 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045196 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user