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

jaikiran do-not-reply at jboss.com
Wed Apr 30 10:08:05 EDT 2008


"mnrz" wrote : 
  |  the thing is that I want to calculate the ID from a formula in which I use an algorithm. however, if I set any field other than ID it won't work as well

I probably am not understanding the requirements of your application correctly. Can't you calculate the ID from the formula using your algorithm, before calling the persist method on entity manager? What i am trying to understand is why does the ID calculation or setting any other field be part of the callback method.

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

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



More information about the jboss-user mailing list