This content has been marked as final.
Show 4 replies
-
1. Re: Schemaupdate tries to create existing sequences ?
barc Dec 7, 2005 10:24 AM (in response to barc)
If someone from JBoss could help me out in this.... -
2. Re: Schemaupdate tries to create existing sequences ?
epbernard Dec 30, 2005 7:45 PM (in response to barc)use a @GenericGenerator and inject the sequence strategy and the "schema" parameter
-
3. Re: Schemaupdate tries to create existing sequences ?
instinct Feb 23, 2006 9:37 AM (in response to barc)How would I do this using current ejb3 PFD implementation?
I'm currently using this:@Entity @Table(name="incident_category", schema="dossier")
and in the class@Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "incident_category_seq") @SequenceGenerator(name = "incident_category_seq", sequenceName = "incident_category_seq") @Column(name = "id")
and postgres is giving me this error:2006-02-23 15:21:58,524 DEBUG [org.hibernate.util.JDBCExceptionReporter] could not get next sequence value [select nextval ('incident_category_seq')] org.postgresql.util.PSQLException: ERROR: relation "incident_category_seq" does not exist
-
4. Re: Schemaupdate tries to create existing sequences ?
instinct Feb 23, 2006 9:46 AM (in response to barc)Well,
changing the code to@SequenceGenerator(name = "incident_category_seq", sequenceName = "dossier.incident_category_seq")
(changing the sequenceName to schema.sequenceName) solved this error, but I think since this did not work for the table specification, it's probably not supposed to work?