How to get JoinColumn value in normal table of Many To Many joined table using Envers audit query

Viewed 31

' In my wokring some propeties are joined to another table while the record is being discarded. I want to pull the joined Ids of the properties that are joined from the normal table(Such as t_customer). Not from the Audit table. How can I do that. My current query is running dynamically. In Java service my code : '

'''
   AuditReader reader  = AuditReaderFactory.get(entityManager);
        String classPath = "com.model.";
        Class<?> classType = Class.forName(classPath+className);
        AuditQuery query = reader.createQuery().forRevisionsOfEntity(Class.forName(classPath+className), false, true);
        query.add(AuditEntity.id().eq(Long.parseLong(id)));
        List<Object> logList = query.getResultList();

        return ResponseEntity.ok().body(logList);

'''
0 Answers
Related