adorsys/secure-token-service

Custom Sequence Generator not batch compatible

Mme-adorsys opened this issue · 0 comments

Regarding:
There is yet another important runtime impact of choosing IDENTITY generation: Hibernate will not be able to JDBC batching for inserts of the entities that use IDENTITY generation. The importance of this depends on the application specific use cases. If the application is not usually creating many new instances of a given type of entity that uses IDENTITY generation, then this is not an important impact since batching would not have been helpful anyway.

The custom sequence generator seems not to work properly and produces duplicate key errors. This might be because of the reason mentioned above. Therefore, the custom sequence generator should be replaced with the build in generator from database