开发者

difference between native and increment id generator type

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜