3 Replies Latest reply on Dec 29, 2007 7:37 AM by alex_ro_bv

    persist entities problem

    alex_ro_bv

      Hi all, I'm new to seam, and I like it so far. I tried to develop a small project but I hit this exception: org.hibernate.exception: could not get nex sequence value. I have a entity with following annotations

      @Entity
      @Table(name="blv_user")
      @Name("user")
      public class User implements Serializable {
       private Long id;
       private Integer version;
       private String name;
       private String pass;
       @Id
       @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="gen_user")
       @SequenceGenerator(name="gen_user", sequenceName="id_user", allocationSize=1)
       public Long getId() {
       return id;
       }
      
       public void setId(Long id) {
       this.id = id;
       }
      


      when I do a query, it works , but with em.persist(user), raises that exception.
      I did not find anything usefull on the documentation for seam, neither on how to save my queries in a xml file like in old hibernate style or how to call an store procedure. Can anyone help me please?