[jboss-user] [EJB 3.0] - Re: regarding @PrePersist and ID assignment

jaikiran do-not-reply at jboss.com
Wed Apr 30 04:35:07 EDT 2008


"mnrz" wrote : Hi all
  | I have an entity in which I need to assign my own ID to its primary key, 
  | I put the code to extract the id and set it to the field in a PrePersist method, 
  | 

You should be setting the id before calling persist. Why are you trying to do that in a callback method?


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

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



More information about the jboss-user mailing list