绝对清楚…您所描述的内容与规范没有 任何 冲突。该规范讨论的是Hibernate分配给您的实体的值,而不是实际存储在数据库序列中的值。
However, there is the option to get the behavior you are looking for. First
see my reply on Is there a way to dynamically choose a @GeneratedValue
strategy using JPA annotations and
Hibernate? That will give
you the basics. As long as you are set up to use that SequenceStyleGenerator,
Hibernate will interpret
allocationSizeusing the “pooled optimizer” in the
SequenceStyleGenerator. The “pooled optimizer” is for use with databases that
allow an “increment” option on the creation of sequences (not all databases
that support sequences support an increment). Anyway, read up about the
various optimizer strategies there.



