Spring Boot/JPA/Hibernate 新手,我试图了解 hibernate.id.new_generator_mappings
的含义。属性实际上确实如此。
根据该文档,它:
"...directs how identity or sequence columns are generated when using @GeneratedValue"
但它并没有真正解释 true
与 false
时的行为差异。有什么想法吗?
最佳答案
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.
关于hibernate - Hibernate new_generator_mappings 到底做了什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43264106/