Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Ignoring oracle sequence
Ignoring oracle sequence [message #686107] Tue, 21 June 2011 14:19 Go to next message
Mauro Flores is currently offline Mauro Flores
Messages: 83
Registered: September 2009
Location: Brasil
Member
I have an entity with the following id configuration:

  @Id
  @Column(name = "NRO_INT_FOO")
  @SequenceGenerator(name = "Foo_SEQ", sequenceName = "ID_FOO_SEQ", allocationSize = 10)
  @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "Foo_SEQ")
  Long               nroIntFoo;


For some reason the last number of the oracle seguence ID_FOO_SEQ is ignored and sometimes I get an ORA-00001 (unique constraint violated)

Any help is appreciated

Thanks. Mauro.
Re: Ignoring oracle sequence [message #686116 is a reply to message #686107] Tue, 21 June 2011 15:01 Go to previous message
Chris Delahunt is currently offline Chris Delahunt
Messages: 995
Registered: July 2009
Senior Member
Is the oracle sequence object incrementing by 10 to match the allocation size you set in the annotation? Try turning logging on to see the SQL that is generated using <property name="eclipselink.logging.level" value="FINEST"/>

Best Regards,
Chris
Previous Topic:eclipselink-orm.xml and Eclipse JPA views
Next Topic:(no subject)
Goto Forum:
  


Current Time: Sun Apr 20 02:59:29 EDT 2014

Powered by FUDForum. Page generated in 0.01479 seconds