Adam Saghy created FINERACT-1686: ------------------------------------ Summary: Auditor fix - Detached Auditor entity was not persisted during cascade persisting Key: FINERACT-1686 URL: https://issues.apache.org/jira/browse/FINERACT-1686 Project: Apache Fineract Issue Type: Bug Reporter: Adam Saghy
While the AppUser (entity) was the auditor, the Spring JPA Auditing was not working perfectly. When a detached entity was saved through assosication the AppUser auditor was not set and it was null in the DB. Example: * Find Loan by id * Create a new transaction * Add the loan transaction to the Loan * Save the Loan entity Outcome: * Loan transaction created by id was null Solution The AppUser entity was changed to be just the AppUser id. It is working just fine now, and anyway the AppUser was never used and was unnecessary anyway to be fetched. Similar issue: [https://stackoverflow.com/questions/38828189/spring-data-jpa-auditing-fails-when-persisting-detached-entity] -- This message was sent by Atlassian Jira (v8.20.10#820010)