-->
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.  [ 2 posts ] 
Author Message
 Post subject: Envers - Join on a particular revision
PostPosted: Thu Nov 10, 2011 11:44 am 
Newbie

Joined: Mon Mar 14, 2011 4:18 pm
Posts: 4
I am experimenting with Hibernate Envers with great success so far. I have one issue that I am currently puzzled as to how to solve. I have an audited entity that contains a field of another audited entity that I always need to have set to particular revision. For example:
Code:
public class ExampleEntity {
    private Long id;
   
    // This would be populated by the audit table at a specific revision.
    private OtherEntity entityAtRevision;
}

My desired steps would be as follows:
1. Create a new OtherEntity. Set its data as usual.
2. Crate a new ExampleEnity. Set its data as usual.
3. Set the OtherEntity onto the ExampleEntity.
4. Persist the data.
5. The next time I retrieve the ExampleEntity record from the database, it will have the same exact revision of OtherEntity regardless of how many times ExampleEntity has been modified.

Is there a way to create a join on a particular revision of an audited entity? Thanks!


Top
 Profile  
 
 Post subject: Re: Envers - Join on a particular revision
PostPosted: Tue Nov 15, 2011 10:31 am 
Newbie

Joined: Mon Mar 14, 2011 4:18 pm
Posts: 4
Any help would be greatly appreciated. Thanks.


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

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.