1 Reply Latest reply on Jan 21, 2009 5:03 AM by Adam Warski

    Query on custom fields in (Extended) RevisionEntity.

    Amar Singh Newbie

      Is there a way to express a query on properties of extended revision entity ?

      @RevisionEntity(ExtendedRevisionListener.class)
      public class ExtendedRevisionEntity {
       @RevisionNumber
       protected Integer versionNumber;
      
       @RevisionTimestamp
       protected long timestamp;
      
       /* custom fields */
       protected int sequenceNumber;
       protected Date receiptDate;
      
       public ExtendedRevisionEntity(){}
      }
      
      @Versioned
      public class Message {
       protected Integer messageNumber;
       protected String status;
       protected String text;
       public Message(){}
      }
      
      
      


      How can following query be expressed ?

      Get all Message in which Staus is "received" and Version's receiptDate is greater than XXX and less than YYY ?

      Basically, enhance query not only for the versioned object but also for the custom fields defined in revision entity ?

      ENVERS: 1.1.ga
      Hibernate: 3.2.6.ga