taskain7 commented on a change in pull request #2144:
URL: https://github.com/apache/fineract/pull/2144#discussion_r824897357



##########
File path: 
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientRepositoryWrapper.java
##########
@@ -44,6 +44,7 @@ public ClientRepositoryWrapper(final ClientRepository 
repository, final Platform
         this.context = context;
     }
 
+    @Transactional

Review comment:
       Self-invocation cannot make @Transactional to take effect. 
@Transactional tells spring to create a proxy around the object. The proxy 
intercepts calls to the object from other objects, but it does not intercept 
calls within the object. And nested @Transactional is not a problem, because 
the default option is REQUIRED, so if `findOneWithNotFoundDetection(final Long 
id)` method has already opened a transaction, then 
`findOneWithNotFoundDetection(final Long clientId, final boolean 
loadLazyCollections)` won't be open a new one.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to