These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Version, Versioning, Audit or what I call groups
PostPosted: Mon Sep 25, 2006 10:35 am 
Newbie

Joined: Mon Sep 25, 2006 10:21 am
Posts: 2
Everyone,

I have been looking through the documentation, forums etc and can not seem to see if Hibernate supports out of the box what I am needing.

I have a simple need to have a version history or what some have called an audit trail, but I want them in the same table. The use case is this:
Take 3 edits and the current state below of a Cost/Price table with some changes over time, these are grouped with a common/same groupID.

Row 1 id="1" "Product Name" "Cost 1" GroupID="1"
Row 2 id="2" "Product Name" "Cost 2" GroupID="1"
Row 3 id="3" "Product Name" "Cost 3" GroupID="1"

At some point in the past a customer has selected the product while its cost was @Cost 2. We need to honor that cost. With a simple foriegn key I am able to find Row 2 and the cost. It is not so obvious to me in hibernate how I would go about maintaining those GroupIDs on edits and then make sure these foriegn keys would work.

I need to obviously on an edit page only show the Row 3 so when I edit it I get row 4 and then show row 4 as my latest and greatest.

Of course I also might need to mark rows as deleted, active or other states and a few other needs that I think would cloud what I am asking for.

Basically in simple terms there are no deletes or updates in these tables, just Inserts to maintain state and info.

If someone could help me out it would be great.

Thank You
Jim Tyrrell


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.