This content has been marked as final. Show 4 replies
If someone from JBoss could help me out in this....
use a @GenericGenerator and inject the sequence strategy and the "schema" parameter
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
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?