2 Replies Latest reply on May 18, 2007 9:58 AM by Nicolas Bregenzer

    persist without @GeneratedValue

    Nicolas Bregenzer Newbie

      Hello

      I'm a bit confused concerning this issue but I think this fits inside the seam context since i am basically following the tutorial drum line with the newest stable seam release.

      i tried to create a simple entity without an @GeneratedValue notations but it doesn't seam to persist. the tables are being generated correctly but no message in thrown in stdout in opposite to a simple persistence operation with an @GeneratedValue notation.

      public class Blog implements Serializable
      {
       @Id
       private long id;
      
       public long getId() { return id;}
       public void setId(long id) { this.id = id; }
      
      }
      


      In my stateless session bean i use

       Blog b = new Blog();
       b.setId(17);
       entityManager.persist(b);
      


      any idea ?