Hi,
I use an entity bean looking like this
| @Entity
| @Table(name="t_gridcells", schema="grid")
| @SequenceGenerator(name="GridCellBeanSequence",
sequenceName="grid.s_gridcells")
| public class GridCellBean {
|
| private Integer id;
|
| @Id(generate=GeneratorType.SEQUENCE, generator="GridCellBeanSequence")
| public Integer getId() {
| return id;
| }
|
| public void setId(Integer id) {
| this.id = id;
| }
|
| }
|
|
This works. The sequence s_gridcells in my grid schema is used to generate the
id for new beans.
The only problem is that when I deploy my ear-file the JBoss server gives the
following error-output:
-------------------------------------------------------
09:31:23,093 INFO [DatabaseMetadata] table not found: grid.s_gridcells
09:31:23,203 ERROR [SchemaUpdate] Unsuccessful: create sequence grid.s_gridcells
09:31:23,203 ERROR [SchemaUpdate] ERROR: relation "s_gridcells" already exists
-------------------------------------------------------
Does anyone have a clue how to fix this?
I know that if I change the sequenceName="grid.s_gridcells" to
sequenceName="s_gridcells" the sequence isn't used/found. So, because there is
no "schema" attribute in the SequenceGenerator-annotation I put the "grid." in
front of the name.
Any help is extremely welcome....
cheers,
pj
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3910221#3910221
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3910221
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user