- 
        1. Re: In Envers, retrieve only the most recent revision for all entities of a particular typer0nan Jun 3, 2010 7:03 AM (in response to r0nan)And yeah i know that forEntitiesAtRevision can gives me the recents, but its not able to give me the revisionnumber. 
- 
        2. Re: In Envers, retrieve only the most recent revision for all entities of a particular typeetellman1 Jun 4, 2010 6:52 PM (in response to r0nan)I had the same question a little while ago. Adam suggested I submit a feature request, and here it is: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5228 
- 
        3. Re: In Envers, retrieve only the most recent revision for all entities of a particular typetspaeth Jun 17, 2010 12:41 PM (in response to etellman1)I'm currently trying to develop such a feature on the envers source. Currently - as I am not so deep into Hibernate - I'm having just one problem: How do I prevent the Envers + Hibernate - stack to replace "e.id" to "table.id and table.REV" during ejb-ql / hql replacements? The mapping is because of a on-the-fly-generated hbm.xml - file as far as I can see. But I only need to query for the id with the group by statement. Any suggestions how to tell Hibernate not to map the key-mapping to both key-elements but only to keep the id - parameter? Regards, Thorsten 
- 
        4. Re: In Envers, retrieve only the most recent revision for all entities of a particular typeadamw Jun 24, 2010 3:21 AM (in response to tspaeth)Maybe you're after e.originalId.id? Adam 
- 
        5. Re: In Envers, retrieve only the most recent revision for all entities of a particular typer0nan Jul 2, 2010 3:07 AM (in response to tspaeth)Can you please let me know if you made it 
- 
        6. Re: In Envers, retrieve only the most recent revision for all entities of a particular typetspaeth Jul 2, 2010 5:56 AM (in response to r0nan)First thanks to Adam for the hint - generally, it seems to do the trick . But unfortunately the tests currently fail as there is a problem with the hsql-tests against the 1.8.0.2 version dependency (where can I change that? - until now I didn't find the corresponding pom.xml anywhere in the dependency tree). It complaints about not querying for the whole primary key For the problem: @see http://blog.gmane.org/gmane.comp.java.hsqldb.user/month=20081201 - it might be fixed in the 1.9 - branch. I switched to mySQL for testing then - but this produces different errors in some tests. Until now I didn't have the time to look any further due to other projects keeping me busy all the time. ASAP I'm into it again - I'll let you know! Thorsten 
 
     
     
    