0
@Table(name = "CACHING_DATA")
@Entity
public class CachingData implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "CACHING_SEQUENCE")
    private Long id;
    private String protocolecode;
    private String uuid;
}

Sequence used

I have above entity class and oracle sequence. But I am getting following error.

Caused by: org.hibernate.MappingException: The increment size of the [CACHING_SEQUENCE] sequence is set to [50] in the entity mapping while the associated database sequence increment size is 1.

1 Answers1

3

You can use allocationSize = 1 for the sequence

@SequenceGenerator(name = "SomeNameForTheGenerator", sequenceName = "CACHING_SEQUENCE", allocationSize = 1)

here the samish issue: org.hibernate.MappingException: The increment size of the sequence is set to [10] in the entity mapping while ... size is [1]

Adata
  • 84
  • 6