• 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic