While using the JPA tablegeneration strategy , we need to mention the allocation size in the @TableGenerator. The default value is 50. We want to override the default allocation size.
But the allocation size needs to be mentioned in every entity. Is there any other better way of doing this ( like configuring it globally or by configuring it as an additional column in the table used for tracking generated Ids )
Using Plain JPA this does not seem to be possible as noted in these posts:
Setting default allocation size for all entities?
How do I configure allocationSize within persistence.xml instead of Entity
It appears that the EclipseLink
JPA implementation does provide you with the ability to set this element globally with the `SessionCustomizer'