I am using PostgreSQL which utilizes sequence generator.
Declaring id

  |         @Id
  |     @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = 
"hibernate3_sequence")
  |     private Long id;
  | 
Wiring up sequence generator for all entities in orm.xml

  | <entity-mappings
  |     xmlns="http://java.sun.com/xml/ns/persistence/orm";
  |     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  |     xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm 
orm_1_0.xsd"
  |     version="1.0">
  |     <sequence-generator
  |             name="hibernate3_sequence"
  |             sequence-name="postmaster_sequence" />
  | </entity-mappings>
  | 
Works like a charm.
Have you tried all available options for SequenceGenerator annotation?

  | @Target({TYPE, METHOD, FIELD}) @Retention(RUNTIME)
  | public @interface SequenceGenerator {
  | String name();
  | String sequenceName() default "";
  | int initialValue() default 1;
  | int allocationSize() default 50;
  | }
  | 
Yet, like I said, I am using PostgreSQL 7.4. Your problem could be DB related.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961261
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to