Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

SequenceGenerator contradictory initialValue & allocationSize  RSS feed

 
Sandeep Vaid
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[P-268]
For using a sequence generator, we need to follow the following steps :
a) CREATE SEQUENCE USER_SEQUENCE START WITH 1 INCREMENT BY 10;
b) @SequenceGenerator(name="USER_SEQUENCE_GENERATOR", sequenceName="USER_SEQUENCE",initialValue=3, allocationSize=4)

NOTE: The initialValue and allocationSize values are different in databaseSequence and SequenceGenerator.

What will happen in this case? Will it throw some error or Which initialValue & allocationSize value will be used ?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!