[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - howto? maually set PK / setID for new rows

fbadt do-not-reply at jboss.com
Mon Oct 16 17:05:21 EDT 2006


For our project, there is the need to manually call the setID for inserted rows.  How can this be done?  Especially staying within the EJB3 spec/API's

Is it as simple as new MyObject
myObject.setID(4);
em.persist(myObject)?

What should be used for GenerationType.   in this case?

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

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



More information about the jboss-user mailing list