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

mnrz do-not-reply at jboss.com
Sun Apr 27 04:36:40 EDT 2008


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, however, the ejb validates the entity before calling that callback method so the exception will be thrown 

my question is where should I put this code or how can I say the EJB not to validate before persisting!

any comment would be of great help

thanks

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

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



More information about the jboss-user mailing list