gpt4 book ai didi

hibernate - Hibernate new_generator_mappings 到底做了什么?

转载 作者:行者123 更新时间:2023-12-01 18:59:26 30 4
gpt4 key购买 nike

Spring Boot/JPA/Hibernate 新手,我试图了解 hibernate.id.new_generator_mappings 的含义。属性实际上确实如此。

根据该文档,它:

"...directs how identity or sequence columns are generated when using @GeneratedValue"

但它并没有真正解释 truefalse 时的行为差异。有什么想法吗?

最佳答案

This ‘hibernate.id.new_generator_mappings’ by default is false which uses the ‘SequenceHiLoGenerator‘ which will have that multiply behavior. Once we set it to true, it will then use the ‘SequenceStyleGenerator‘, which is more jpa and oracle friendly. It generates identifier values based on an sequence-style database structure. Variations range from actually using a sequence to using a table to mimic a sequence.

来源: https://vcfvct.wordpress.com/2016/04/23/jpa-sequencegenerator-with-allocationsize-1-performance-tuning/

关于hibernate - Hibernate new_generator_mappings 到底做了什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43264106/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com