0 Replies Latest reply on Apr 1, 2009 3:55 PM by hey ho

    Audit query: retrieving associated objects

    hey ho Newbie

      hey ho,

      I have two entities whose relationship is many-to-many (User<->Group). The User class contains a Set containing the groups and the Group class contains a Set of users (common way of doing it). i've setup envers so that everything gets audited (@Audited on class level for Group and User), including the relationship. When I query for Audits of entity User, this array containing all revisions (Entities, Revision info and Modification type) is returned. The entity type in this case is of type User of course.

      Coming to the problem: The Set of groups of those retrieved revision users are emtpy. Do I have to do something special so that the many-to-many properties of an Entity are also loaded?

      If yes, I hope there is an abstract way of doing it, since my code to retrieve the revisons is generic as of now.

      Thanks a lot

      heyho