Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate versioning: Version as part of composite key  RSS feed

Amar Jee
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've a few existing tables which have an id and version as PK.
This is mainly to keep track of all the updates.
Following are the problems I faced:
1. version can't be a part of composite-id.
2. if version is outside the composite-id, its not part of the PK and will not let me insert another version (due to PK violation).
3. envers wasn't helpful as it creates a seperate AUD table wheras I want the versioning in the same table.
Any ideas/suggestions would be greatly be appreciated
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!