In file: org.hibernate.envers.query.impl.RevisionsOfEntityQuery
we have the following line:
Object entity = entityInstantiator.createInstanceFromVersionsEntity(entityName, versionsEntity, revision);
Is there any possibility to search for RevisionsOfEntity query without fetching actual entities? (by fetching only RevisionsData object - which are available in revisionData = arrayResultRow[1]).
I'm using custom Revision object with all required info. Currently when envers fetches entities it generates a lot of queries which results are not used.
Maybe you could introduce another parameter to return List<Object> queryResult = buildAndExecuteQuery();
Right now we check following condition:
List<Object> queryResult = buildAndExecuteQuery();
if (hasProjection) {
return queryResult;
} else {
....}
Maybe we can change it to :
List<Object> queryResult = buildAndExecuteQuery();
if (hasProjection || returnRawResponse) {
return queryResult;
} }
and introduce returnRawResponse parameter, should be sufficient. Since REvisionData is present in queryResult at position nr 1.
|