I am working on JPA (Hibernate implementation), Spring and the Stripes web application. I have several JPA objects that have the following common fields for audit and query purposes:
createdBy - user ID of the person who created the object. createdOn - object creation date updatedBy - identifier of the user who last updated the object updatedOn - date of the last update of the object
The application works for me, so createdOn and updatedOn are installed automatically when the object is saved, but I'm not sure how I can get the createdBy and updatedBy fields filled out without having to go through the current user ID from the controller class to the DAO.
Does anyone have any suggestions on how I can do this without passing user IDs everywhere? Please note that the current user ID is currently stored in the HttpSession object, so I need to access this data somehow ...
Thanks!
spring hibernate jpa stripes
Jmm
source share