title: Hibernate Envers - get revisions and objects between dates
body: <p>Consider a Car that has contracts, amendments, maintenance, dealers etc... 
  When there is an update in a contract one will find a <strong>revision_id</strong> and a <strong>revision_timestemp</strong> and if you go to the contract_aud you can find by the reivsion_id the new version.</p>
  
  <p>My goal is to provide the end user a query where he can ask: what <strong>cars</strong> (plural) had revisions between startDate and endDate. Note that the revision can be in contract/maintenance/dealer etc...(and I only cares about the car's IDs) </p>
  
  <p>From what I have today, one can query by date in the following manner:</p>
  
  <pre><code>    AuditReader auditReader = AuditReaderFactory.get(em);
      AuditQuery q = auditReader.createQuery().forRevisionsOfEntity(Car.class, false, true);
      q.add(AuditEntity.revisionProperty("timestamp").ge(startDate.getTime()));
      q.add(AuditEntity.revisionProperty("timestamp").lt(endDate.getTime()));
  </code></pre>
  
  <p>But you can note that I send the <strong>Car.class</strong> and if the revision was made in the '<strong>contract</strong>' I will have to send the Contract.class (and later get the car's ID)</p>
  
  <p>I have 20+ tables with postfix _AUD so it makes no sense to go 20 times to the db. </p>
  
  <p>Question: how can one query for revision that happen between dates and the revision number and the <strong>object</strong> that was changed. </p>