2 Replies Latest reply on Aug 24, 2011 10:37 AM by desol4tion

    Envers inheritance property problem

    desol4tion

      Hi,

       

      i have two classes, classA and classB. and classB extend classA.

      I try to do a query on the classB but i need to access to an attribut of my classA. So i do

       

            AuditQuery query = reader.createQuery().forRevisionsOfEntity(classB.class, false, true);

            query.add(AuditEntity.revisionNumber().le(revisionMax));

            query.addProjection(AuditEntity.property("attribute")); (attribute is a property of class A)

            query.addProjection(AuditEntity.revisionNumber());     

            result= query.getResultList(); 

       

      And i have an error that tell me that the property is unknown. When i use hibernate and my jpa querys, i have no problem, my mapping are goods. Thx for your help !