While i was looking the code for audit-trial field i found org.broadleafcommerce.common.audit.AuditableListener which populate created user id always 0
protected void setAuditValueAgent(Field field, Object entity) throws IllegalArgumentException, IllegalAccessException {
try {
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
if (authentication != null) {
Object principal = authentication.getPrincipal();
}
} catch (Exception e) {
e.printStackTrace();
}
field.setAccessible(true);
field.set(entity, 0L);
}
if this is the case then how do it populate audit field. If this code is expected then how it will populate creator field
This forum is in readonly mode and serves as an archive of old information. All posting, registration and commenting abilities have been turned off. To get help, the Broadleaf team reguarly monitors the broadleaf-commerce tag on Stack Overflow so please ask your questions there.