|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Problem with sequence setupHi All,
I'm using Eclipselink version 1.1.2 and I have the following problem: If I have a simply entity with the following item representing the primary key @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQUENCE_S1") @SequenceGenerator(name = "SEQUENCE_S1", sequenceName = "SEQUENCE_S1", allocationSize = 100) @Column(name = "ID", nullable = false) private Long id; And the SEQUENCE_S1 is a freshly created uninitialized sequence with increment by value of 100. Then my unit test case, that is persisting an entity, will fail with the following exception: org.springframework.dao.DataIntegrityViolationException: Exception Description: The sequence named [SEQUENCE_S1] is setup incorrectly. Its increment does not match its pre-allocation size.; nested exception is javax.persistence.EntityExistsException: The really weird thing is. If I have the allocationsize set to 1 or if I by hand initialize the sequence before I run the unit test, the unit test will NOT fail. Or even when I change nothing and just run the test a second time, it will not fail. I'm inclined to think that there may be some issues when persisting an entity to the (Oracle XE 10g) database with an uninitialized sequence and allocationSize is not 1. Can someone help me in finding the cause and solution of this problem? Thanks in advance, Ruud Bijkerk, Oracle |
|
|
Re: Problem with sequence setup "increment does notmatch its pre-allocation size.; nested exception isjavax.persistence.EntityExis |
| Free embeddable forum powered by Nabble | Forum Help |