[jboss-user] [JBoss Seam] - Re: seam-gen and @GeneratedValue

anarinsky do-not-reply at jboss.com
Fri Apr 6 13:06:06 EDT 2007


Andy,

I have the same problem with generated entities.  

Did you find any workaround?

My  database was generated by Hibernate using org.hibernate.tool.hbm2ddl.SchemaExportTask

Id supposed to be auto generated.  However, when I add @GeneratedValue to the Id getter I am getting the exception on startup:
ObjectName: persistence.units:ear=spot4.ear,unitName=spot4
  State: FAILED
  Reason: javax.persistence.PersistenceException: org.hibernate.HibernateException: Missing sequence or table: hibernate_sequence
  I Depend On:
    jboss.jca:service=DataSourceBinding,name=spot4Datasource

With the old variant of Hibernate this auto sequence generated worked with the following annotation used in Doclet:
/**
 * @hibernate.id column="ID" generator-class="increment" unsaved-value="0"
 */ 

Thank you!


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

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



More information about the jboss-user mailing list