And yeah i know that forEntitiesAtRevision can gives me the recents, but its not able to give me the revisionnumber.
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?
Maybe you're after e.originalId.id?
Can you please let me know if you made it
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 188.8.131.52 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!