[jboss-user] [JBoss Seam] - Re: javax.ejb.EJBTransactionRolledbackException: validation

jknotzke do-not-reply at jboss.com
Thu Aug 9 14:11:07 EDT 2007


  Ok.. I figured it out.. sorta.

  The problem is:


  | 
  | @Entity
  | public class Workout implements Serializable {
  | 
  |         @Id @NotNull @GeneratedValue
  |         private Long id;
  | 

   When I call em.persist(workout) it fails validation because id is null.. If I take out @GeneratedValue and add an ID manually, all is OK.

   Why isn't @GeneratedValue working ?

   J

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

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



More information about the jboss-user mailing list