开发者

difference between native and increment id generator type

开发者 https://www.devze.com 2023-03-15 16:27 出处:网络
What is the basic difference between when we use native and increment types id generator in hibernate.

What is the basic difference between when we use native and increment types id generator in hibernate.

As i was having a entity, in which the generator was previuosly native, but then changed it to incremental for some time, it was working properly. But just yesterday, when i changed in to native again, the insertion is failing saying Contraint Violation.

开发者_JS百科

I have index set up in the id field, which is auto generated.

Am i missing something here.

Thanks


Native is generated by DB - if DB do it. Increment - generates by hibernate that are unique only when no other process is inserting data into the same table.

0

精彩评论

暂无评论...
验证码 换一张
取 消