[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5500?page=c...
]
Erik-Berndt Scheper commented on HHH-5500:
------------------------------------------
I propose to add the following extra method
{code:title=org.hibernate.envers.AuditReader.java|borderStyle=solid}
/**
* Find the entities with a certain primary key, at the given revisions.
* @param cls Class of the entity.
* @param primaryKey Primary key of the entity.
* @param revisions Revision numbers for which to get the entity.
* @return A map containing the revision numbers and the entity instance at this
revision
* @throws IllegalArgumentException If cls or primaryKey is null or revision is less or
equal to 0.
* @throws NotAuditedException When entities of the given class are not audited.
* @throws IllegalStateException If the associated entity manager is closed.
*/
<T> Map<Number, T> findEntities(Class<T> cls, Object primaryKey,
Set<Number> revisions) throws IllegalArgumentException, NotAuditedException,
IllegalStateException;
{code}
However, I believe this query is only feasible after HHH-5372 (improve Envers query
performance by using new REVEND column) is implemented in trunk, and subqueries are no
longer needed (using the ValidAuditTimeStrategy).
Extend AuditReader interface with findRevisions() method
--------------------------------------------------------
Key: HHH-5500
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5500
Project: Hibernate Core
Issue Type: Sub-task
Components: envers
Reporter: Erik-Berndt Scheper
To improve performance, it would be benificial to extend the Envers AuditReader
interface, so that a list of audited entities can be retrieved in one query.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira