• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate versioning: Version as part of composite key

 
Amar Jee
Greenhorn
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
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!