You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Adam Saghy (Jira)" <ji...@apache.org> on 2022/08/09 09:11:00 UTC

[jira] [Resolved] (FINERACT-1686) Auditor fix - Detached Auditor entity was not persisted during cascade persisting

     [ https://issues.apache.org/jira/browse/FINERACT-1686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adam Saghy resolved FINERACT-1686.
----------------------------------
    Resolution: Fixed

> 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
>            Priority: Major
>
> 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)